Skip to content

False-positive for N811 for full-caps, but non-constant imports #11862

@L4rryFisherman

Description

@L4rryFisherman

The line:

from uuid import UUID as UUIDType

flags as N811, whereas UUID is a class and not a constant.

Command used:

> ruff check
file.py:1:18: N811 Constant `UUID` imported as non-constant `UUIDType`

Ruff version: 0.4.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtype-inferenceRequires more advanced type inference.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions