Pylint raises error saying "default" isn't valid for TypeVar
nfelt14 opened this issue · 2 comments
After upgrading to 4.12.0, pylint is raising the following error for TypeVar
s that have default values:
E1123: Unexpected keyword argument 'default' in constructor call (unexpected-keyword-arg)
The same code does not raise an error when using 4.11.0.
Sounds like you found a bug in pylint. I don't know how pylint decides what keyword arguments a constructor call accepts, but typing_extensions.TypeVar
definitely accepts default=
.
Could you report this to pylint first? If there's some way we could write our code that makes pylint's job easier, I would consider it, but I have no idea what it's looking at.
Sounds like you found a bug in pylint. I don't know how pylint decides what keyword arguments a constructor call accepts, but
typing_extensions.TypeVar
definitely acceptsdefault=
.Could you report this to pylint first? If there's some way we could write our code that makes pylint's job easier, I would consider it, but I have no idea what it's looking at.
I will do that.