-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not consider ‘import a.b as b’ an explicit reexport
The point of the ‘import a as a’ and ‘from a import b as b’ syntax for explicit reexport is that it indicates an intention to do something different from the ordinary ‘import a’ and ‘from a import b’. That is not the case with ‘import a.b as b’. Even mypy’s own code includes ‘import mypy.types as types’, which was not intended to be a reexport; if it were, it would be written ‘from mypy import types as types’. Pyright agrees that ‘import a.b as b’ should not reexport. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
- Loading branch information
Showing
2 changed files
with
9 additions
and
1 deletion.
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