-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Erroneous number of arguments is reported in a constructor call with multiple inheritance #5299
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Comments
erictraut
pushed a commit
that referenced
this issue
Jun 14, 2023
…` call. There were situations where the incorrect MRO class was used. This addresses #5299.
erictraut
pushed a commit
that referenced
this issue
Jun 15, 2023
…` call. There were situations where the incorrect MRO class was used. This addresses #5299.
erictraut
pushed a commit
that referenced
this issue
Jun 15, 2023
…` call. There were situations where the incorrect MRO class was used. This addresses #5299.
erictraut
added a commit
that referenced
this issue
Jun 15, 2023
…` call. There were situations where the incorrect MRO class was used. This addresses #5299. (#5304) Co-authored-by: Eric Traut <[email protected]>
Thanks for the bug report along with the great repro and code sample. This will be fixed in the next release. |
erictraut
added
the
addressed in next version
Issue is fixed and will appear in next published version
label
Jun 15, 2023
This is included in pyright 1.1.315, which I just published. It will also be included in this week's insiders release of pylance. |
@erictraut Thank you. Much appreciated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Describe the bug
When multiple inheritance is used, a call of one of the
__init__
methods in__mro__
order is reported as if it expects zero arguments, when the referenced constructor expects arguments.To Reproduce
This is an example with constructors with different arguments.
Having constructors arranged to have same arguments, which isn't always doable for obvious reasons, reports the same error, just in the different spot.
Expected behavior
In both cases the
Y.__init__
call requires arguments and should not be reported as an error.Additional context
Observed in the latest Visual Studio and in
pyright
v1.1.304 on Windows, with Python 3.10.The text was updated successfully, but these errors were encountered: