You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skip more method bodies in third-party libraries (#19586)
A while ago we started stripping function bodies when checking
third-party libraries. This PR pushes this idea further:
* Tighten the check in `fastparse.py` to only consider `foo.bar` as
possible self attribute definition.
* Do not type-check bodies where we didn't find any `self` attribute
_definitions_ during semantic analysis.
* Skip method override checks in third-party libraries.
In total this makes e.g. `mypy -c 'import torch'` ~10% faster.
Surprisingly, this also has some visible impact on self-check.
0 commit comments