Skip to content
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

chore: Ensure Mixins are ordered according to the MRO #26288

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Dec 15, 2023

SUMMARY

Somewhat of a lazy Friday afternoon PR. Whilst reviewing PRs earlier today I realized there were instances where the class ordering was incorrect, i.e., the following wasn't being adhered to:

Python's Method Resolution Order (MRO) determines how they should be arranged. In a nutshell, mixins come first and base classes come last.

This PR ensures that, per Python's MRO the class inheritance is correctly defined. Potential problematic classes were identified by running git grep Mixin).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

CI.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@john-bodley john-bodley marked this pull request as ready for review December 15, 2023 23:47
@john-bodley john-bodley requested a review from a team as a code owner December 15, 2023 23:47
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8450cca) 69.18% compared to head (44e99e9) 69.18%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #26288   +/-   ##
=======================================
  Coverage   69.18%   69.18%           
=======================================
  Files        1945     1945           
  Lines       75968    75968           
  Branches     8467     8467           
=======================================
  Hits        52557    52557           
  Misses      21224    21224           
  Partials     2187     2187           
Flag Coverage Δ
hive 53.67% <100.00%> (ø)
mysql 78.08% <100.00%> (ø)
postgres 78.18% <100.00%> (ø)
presto 53.63% <100.00%> (ø)
python 82.86% <100.00%> (ø)
sqlite 76.84% <100.00%> (ø)
unit 55.79% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL! LGTM

@john-bodley john-bodley merged commit aafb54d into apache:master Dec 16, 2023
60 checks passed
@john-bodley john-bodley deleted the john-bodley--reorder-mixin branch December 16, 2023 01:12
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.0.0 labels Apr 17, 2024
dpgaspar pushed a commit to preset-io/superset that referenced this pull request May 6, 2024
jzhao62 pushed a commit to jzhao62/superset that referenced this pull request May 16, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 4.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants