Skip to content

invalid-name check for TypeAlias should allow for digits in names #8485

Closed
@sodul

Description

@sodul

Bug description

from typing import Union

Ec2Data = Union[int, str]

Configuration

No response

Command used

pylint ec2.py

Pylint output

Type alias name "Ec2Data" doesn't conform to predefined naming style (3:0) [invalid-name]

Expected behavior

Digits in variable names are pretty common and should be allowed. In the example above we work with EC2 and there is not good substitute for using a digit.

We believe pylint is being too strict in the new check introduced in #7116.

Pylint version

pylint 2.17.0
astroid 2.15.0
Python 3.11.2 (main, Mar 20 2023, 21:17:15) [Clang 14.0.0 (clang-1400.0.29.202)]

OS / Environment

MacOS 13.2.1

Additional dependencies

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: invalid-nameFalse Positive 🦟A message is emitted but nothing is wrong with the codeHelp wanted 🙏Outside help would be appreciated, good for new contributorsNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions