Skip to content

false-positive for PD011 and Django's TextChoices #11858

@Zerotask

Description

@Zerotask

A call with ruff check . and the PD rule activated, prints the error

PD011 Use `.to_numpy()` instead of `.values`

The mentioned line is if value not in User.Gender.values:

User.Gender is a TextChoices based class from django which itself inherits from enum.Enum and StrEnum.
No pandas or numpy involved

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions