-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More improvements to following imports in mypy daemon (#8616)
This includes a bunch of changes to following imports: * Fix bug with cached modules without ASTs by loading the AST as needed * Improve docstrings and simplify code * Rename `follow_imports` * Merge `seen` and `sources_set` * Address some TODO items This may be easier to review by looking at individual commits. I think that following imports is ready to be enabled after this has been merged. We can always revert the change before the next release if we we encounter major issues. Major things I know about that still don't work (I'll try to address at least the first one before the next release): * `-m` and `-p` don't work correctly with dmypy (I think that happens also in other modes, but might be worse when following imports) * Suppressed modules are incorrect with namespace modules (happens also in other modes) * File events are not supported (but these are undocumented, so it's not critical?) * Performance with a huge number of files is unknown (other import modes have better performance and can be used as fallbacks if this is a problem) Work towards #5870. Continues progress made in #8590.
- Loading branch information
Showing
3 changed files
with
98 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters