Skip to content

Allow custom short names #2554

@rusmux

Description

@rusmux

Rule request

While some short names have been whitelisted in #1548, there are still cases when using short names is justified. For example, albumenatations library uses A as an alias in their examples. Or x and y are common names in machine learning. Disabling the entire WPS111 rule would be too broad, while putting noqa would pollute the code. There is an option to add allowed domain names (#1106), but this does not exclude them from the WPS111 rule.

Thesis

Make adding variable names to allowed domain names exclude them from the WPS111 rule.

Reasoning

There are still short names that are justified to be used in some domains. Like x and y in machine learning or A as an alias for the albumentations library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions