Pylint raises error saying "default" isn't valid for TypeVar #9672
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
Bug description
After upgrading to
typing_extensions==4.12.0
, pylint is raising the following error forTypeVar
s that have default values:The same code does not raise an error when using
typing_extensions==4.11.0
.I believe that it is following the import to the
typing_extensions
module but it is not respecting the if statement that blocks the import of theTypeVar
class from thetyping
module if PEP-696 isn't implemented.from
typing_extensions.py
:Originally filed python/typing_extensions#411
Configuration
No response
Command used
`pylint .`
Pylint output
`E1123: Unexpected keyword argument 'default' in constructor call (unexpected-keyword-arg)`
Expected behavior
No error should be raised.
Pylint version
OS / Environment
No response
Additional dependencies
The text was updated successfully, but these errors were encountered: