IMPORT001warningPro

reserved-keyword-import

Import shadows a Python builtin or keyword.

Applies to: Python

Why this matters

Importing a name that shadows a Python builtin (like 'id', 'type', 'list') or keyword makes code confusing and can cause subtle bugs. Use a different name or alias the import.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, IMPORT001 includedstablestack explain IMPORT001

IMPORT001 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: IMPORT001