Skip to content

Feature Request: Custom allowlist for Magic Numbers (PLR2004) #10009

@Spectre5

Description

@Spectre5

PLR2004 has a few allowed numbers including '', 0, and 1. #9964 has fixed a bug so that 0.0 and 1.0 are also allowed. There is already an option to ignore certain types of variables from the check. I'd like to request an option to extend the allowlist. For example, I have a library where 2 (and 2.0) are really common and I don't want to use a global variable for it. So I ether need many noqa comments or to disable the check entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    configurationRelated to settings and configurationneeds-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