html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/6135#issuecomment-1008285229,https://api.github.com/repos/pydata/xarray/issues/6135,1008285229,IC_kwDOAMm_X848GTYt,14371165,2022-01-09T12:07:05Z,2022-01-09T12:07:05Z,MEMBER,"Since the function isn't typed currently mypy has no clue what `n` and `freq` is supposed to be, so it just skips statically checking the method right now. And since no type checking has been done in the past those isinstance check have probably been added to makes sure the type is correct, but this is checked at runtime so it costs time. At runtime it usually is best to assume all inputs are typed correctly and avoid these instance checks. I suppose if the IDE supports type checking it could feel runtime-y but it probably still is just statically checks if the code changes you did are valid.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1093466537