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 (#14086)
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