Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid-name type alias false-positive for union variables without assignment values #8540

Closed
yilei opened this issue Apr 4, 2023 · 0 comments · Fixed by #8541 or #9093
Closed

invalid-name type alias false-positive for union variables without assignment values #8540

yilei opened this issue Apr 4, 2023 · 0 comments · Fixed by #8541 or #9093
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Milestone

Comments

@yilei
Copy link
Contributor

yilei commented Apr 4, 2023

Bug description

# pylint: disable=missing-docstring
from typing import Union
x: Union[str, int]

Configuration

No response

Command used

pylint t.py

Pylint output

************* Module t
t.py:3:0: C0103: Type alias name "x" doesn't conform to predefined naming style (invalid-name)

Expected behavior

No output.

Pylint version

pylint 2.17.2
astroid 2.15.2
Python 3.11.1 (main, Jan 10 2023, 15:08:01) [Clang 14.0.0 (clang-1400.0.29.202)]

OS / Environment

No response

Additional dependencies

Similar to #8487. This is a bug found in #8537, let me send a separate PR first.

@yilei yilei added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Apr 4, 2023
@Pierre-Sassoulas Pierre-Sassoulas added False Positive 🦟 A message is emitted but nothing is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Apr 4, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.17.3 milestone Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
2 participants