Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not consider import a.b as b an explicit reexport #14086

Merged
merged 3 commits into from
Sep 20, 2023

Commits on Nov 13, 2022

  1. 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>
    andersk committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    c444466 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2023

  1. Configuration menu
    Copy the full SHA
    1f7b1d3 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2023

  1. Configuration menu
    Copy the full SHA
    a5a7d5c View commit details
    Browse the repository at this point in the history