-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extraneous reportArgumentType when calling super().__init__ #9901
Comments
Pyright is working as intended here. The default value has type Your options are:
|
It is inconsistent though; it no longer errors if you do class Parameter:
def __init__(self):
pass instead. |
Yeah, that's inconsistent. I'll reopen and investigate further. |
…ing the evaluation of a call whose target signature involves a parameter with a default argument value, notably where the type of the default value isn't assignable to the declared type of its parameter. This addresses #9901.
This is addressed in pyright 1.1.395. |
The fix for this inconsistency resulted in a regression that is affecting many pyright users. I'm going to back out this change and reopen the issue so I have time to reconsider the approach. |
…tion with a default argument that is not assignable to the declared parameter type. An error will still be reported in the case where the declared parameter type includes an unsolved type variable in most cases, but it will no longer be reported if the unsolved type variable is due to a pseudo-generic class. This addresses #9901.
…tion with a default argument that is not assignable to the declared parameter type. An error will still be reported in the case where the declared parameter type includes an unsolved type variable in most cases, but it will no longer be reported if the unsolved type variable is due to a pseudo-generic class. This addresses #9901. (#10028)
This is annoying when
testclass
is from a dependency.The text was updated successfully, but these errors were encountered: