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

fix: construct SupersetErrors properly #9799

Merged
merged 2 commits into from May 13, 2020
Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented May 13, 2020

SUMMARY

I'm shocked mypy didn't catch this, but here ya go...

SupersetError should be initialized with an error_type, not a type

TEST PLAN

CI

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

to: @john-bodley @michellethomas @villebro

@codecov-io
Copy link

codecov-io commented May 13, 2020

Codecov Report

Merging #9799 into master will decrease coverage by 0.23%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9799      +/-   ##
==========================================
- Coverage   70.84%   70.61%   -0.24%     
==========================================
  Files         588      588              
  Lines       30472    30472              
  Branches     3153     3153              
==========================================
- Hits        21589    21518      -71     
- Misses       8769     8834      +65     
- Partials      114      120       +6     
Flag Coverage Δ
#cypress 52.90% <ø> (-0.73%) ⬇️
#javascript 59.02% <ø> (ø)
#python 70.99% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
superset/viz.py 72.00% <ø> (ø)
...et-frontend/src/SqlLab/reducers/getInitialState.js 33.33% <0.00%> (-16.67%) ⬇️
superset/db_engine_specs/mysql.py 78.26% <0.00%> (-13.05%) ⬇️
superset-frontend/src/reduxUtils.js 76.47% <0.00%> (-10.30%) ⬇️
...rontend/src/SqlLab/components/TabbedSqlEditors.jsx 75.52% <0.00%> (-6.30%) ⬇️
superset-frontend/src/SqlLab/actions/sqlLab.js 61.13% <0.00%> (-5.03%) ⬇️
...rontend/src/SqlLab/components/SqlEditorLeftBar.jsx 44.00% <0.00%> (-4.00%) ⬇️
superset-frontend/src/SqlLab/reducers/sqlLab.js 37.44% <0.00%> (-3.30%) ⬇️
...end/src/SqlLab/components/TemplateParamsEditor.jsx 88.57% <0.00%> (-2.86%) ⬇️
superset-frontend/src/components/TableSelector.jsx 81.34% <0.00%> (-2.24%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45c8fcf...a90102c. Read the comment docs.

@etr2460 etr2460 merged commit cf30e16 into master May 13, 2020
@john-bodley
Copy link
Member

john-bodley commented May 13, 2020

@etr2460 mypy type checking isn't yet enforced for all modules per here. That may have been the reason.

michellethomas pushed a commit to airbnb/superset-fork that referenced this pull request May 13, 2020
* fix: construct SupersetErrors properly

* Update viz_sip38.py

(cherry picked from commit cf30e16)
@etr2460
Copy link
Member Author

etr2460 commented May 13, 2020

So I can add superset.errors to that list and i should get type checking?

@john-bodley
Copy link
Member

@etr2460 you would need to add superset.viz et al. (as opposed to superset.errors) to the list in order to invoke the following error,

superset/viz.py:467: error: Unexpected keyword argument "type" for "SupersetError"

That said there is no harm in adding modules which are completely typed.

@etr2460 etr2460 added the SIP-40 label Jun 2, 2020
@etr2460 etr2460 deleted the etr2460--superset-error-type branch July 1, 2020 15:14
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Mar 12, 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/XS 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants