Skip to content

useless-import-alias (PLC0414) rule contradicts PEP484 #6294

@DetachHead

Description

@DetachHead
import numpy as numpy

this means explicit re-export, as mentioned in PEP484:

Modules and variables imported into the stub are not considered exported from the stub unless the import uses the import ... as ... form or the equivalent from ... import ... as ... form. (UPDATE: To clarify, the intention here is that only names imported using the form X as X will be exported, i.e. the name before and after as must be the same.)

perhaps this rule should be removed, since it contradicts type checking rules

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionAwaiting a decision from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions