Description
Bug description
Example code:
# pylint: disable=missing-docstring
from typing import TypeAlias
GoodTopLevelName: TypeAlias = int
bad_top_level_name: TypeAlias = int
def my_func():
GoodLocalName: TypeAlias = int
bad_local_name : TypeAlias = int
del GoodLocalName, bad_local_name
Configuration
No response
Command used
pylint t.py
Pylint output
t.py:5:0: C0103: Type alias name "bad_top_level_name" doesn't conform to predefined naming style (invalid-name)
Expected behavior
It should also raise invalid-name
for the bad_local_name
variable
Pylint version
pylint 2.17.2
astroid 2.15.2
Python 3.11.2 (main, Mar 3 2023, 16:02:46) [GCC 12.2.0]
OS / Environment
No response
Additional dependencies
I having a PR coming.