The transifex.api.TransifexApi contains a number of lines of the form Team: JsonApiResource (
|
# Auto-completion support |
). A comment says this is for autocompletion support.
However, these type annotations are incorrect as the class has attributes that contain types (subclasses of JsonAPiResource), not instances. This leads type checkers to show incorrect errors when these attributes are used.
To fix, the code should have lines of the form type[JsonApiResource] instead, indicating that the attributes contain types, not instances.
The
transifex.api.TransifexApicontains a number of lines of the formTeam: JsonApiResource(transifex-python/transifex/api/__init__.py
Line 76 in 82ac996
However, these type annotations are incorrect as the class has attributes that contain types (subclasses of JsonAPiResource), not instances. This leads type checkers to show incorrect errors when these attributes are used.
To fix, the code should have lines of the form
type[JsonApiResource]instead, indicating that the attributes contain types, not instances.