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
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 <[email protected]>
0 commit comments