pylint-dev/pylint
invalid-name check for TypeVar should allow for digits in names
Chiusa
#8499 aperta il 27 mar 2023
C: invalid-nameFalse Positive 🦟Good first issueHacktoberfestHelp wanted 🙏Needs PR
Metriche repository
- Star
- (4978 stelle)
- Metriche merge PR
- (Merge medio 12h 9m) (29 PR mergiate in 30 g)
Descrizione
Bug description
"""Ec2T example."""
from typing import TypeVar
T = TypeVar('T')
EcTwoT = TypeVar('EcTwoT')
Ec2T = TypeVar('Ec2T')
Configuration
No response
Command used
pylint typevar.py
Pylint output
************* Module typevar
typevar.py:7:0: C0103: Type variable name "Ec2T" doesn't conform to predefined naming style (invalid-name)
------------------------------------------------------------------
Your code has been rated at 7.50/10 (previous run: 5.00/10, +2.50)
Expected behavior
Ec2T should be valid.
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