You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a duplicate of #2018. The issue is that the naming styles need at least 3 characters by default so T fails the check since it is too short. You can check that yourself by passing --include-naming-hint=y which will show the regular expression against which the name is validated.
It would be good if there was a way to make pylint recognize this correctly as a type variable instead of a "class name", since the usual convention for type variables is to be single-letter (as opposed to class names).
I don't want to disable the lint for real class names, but I do want to disable it for type vars.
Steps to reproduce
from typing import TypeVar
T = TypeVar('T')
C0103: Class name "T" doesn't conform to PascalCase naming style (invalid-name)
Current behaviour
C0103: Class name "T" doesn't conform to PascalCase naming style (invalid-name)
Expected behaviour
no C0103
pylint --version output
pylint 2.4.3
astroid 2.3.1
Python 3.8.0 (default, Oct 15 2019, 14:05:58)
[GCC 7.4.0]
The text was updated successfully, but these errors were encountered: