Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Fix attribute type resolution with multiple inheritance#18415
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fix attribute type resolution with multiple inheritance#18415
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
hauntsaninja left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice, will leave for Ivan but had small comment
Uh oh!
There was an error while loading.Please reload this page.
| pass | ||
| class D(D0,D1,C): | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should we expect an error for something like:
class D3(D0,D1,C): class M(A.M): passThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We certainly should expect an error there as such an override violates LSP. But overrides are checked elsewhere, I'm only modifying inherited attributes compatibility checks in this PR.
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Diff frommypy_primer, showing the effect of this PR on open source code: xarray (https://github.com/pydata/xarray)+ xarray/core/groupby.py:1610: error: Unused "type: ignore" comment [unused-ignore]+ xarray/core/groupby.py:1778: error: Unused "type: ignore" comment [unused-ignore]+ xarray/core/resample.py:236: error: Unused "type: ignore" comment [unused-ignore]+ xarray/core/resample.py:379: error: Unused "type: ignore" comment [unused-ignore]ibis (https://github.com/ibis-project/ibis)- ibis/common/collections.py:280: error: Definition of "get" in base class "Mapping" is incompatible with definition in base class "Mapping" [misc] |
d86b1e5 intopython:masterUh oh!
There was an error while loading.Please reload this page.
Fixes#18268.Fixes#9319.Fixes#14279.Fixes#9031.
Supersedes#18270 as requested by@ilevkivskyi.
This PR introduces two changes:
map_type_from_supertypewhen checking generic attributes