Skip to content

chore: Update mypy and fix stubs issue - #24033

Merged
dpgaspar merged 2 commits into
apache:masterfrom
sebastianliebscher:fix/server/mypy-issue-for-flask-stubs
May 12, 2023
Merged

dpgaspar merged 2 commits into
apache:masterfrom
sebastianliebscher:fix/server/mypy-issue-for-flask-stubs

Conversation

@EugeneTorap

@EugeneTorap EugeneTorap commented May 12, 2023 •

Copy link
Copy Markdown
Contributor

SUMMARY

Bump mypy from 1.0.1 to 1.3.0
Make explicit the additional_dependencies for missed stubs
Fix mypy type errors

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@codecov

codecov Bot commented May 12, 2023 •

Copy link
Copy Markdown

Codecov Report

Merging #24033 (4ee2ed7) into master (7fe0ca1) will increase coverage by 0.00%.
The diff coverage is 61.90%.

❗ Current head 4ee2ed7 differs from pull request most recent head 10d5f95. Consider uploading reports for the commit 10d5f95 to get more accurate results

@@           Coverage Diff           @@
##           master   #24033   +/-   ##
=======================================
  Coverage   68.21%   68.21%           
=======================================
  Files        1941     1941           
  Lines       75259    75261    +2     
  Branches     8168     8168           
=======================================
+ Hits        51341    51343    +2     
  Misses      21829    21829           
  Partials     2089     2089           
Flag Coverage Δ
hive 53.18% <33.33%> (-0.01%) ⬇️
mysql 78.92% <42.85%> (+<0.01%) ⬆️
postgres 78.99% <42.85%> (+<0.01%) ⬆️
presto 53.10% <33.33%> (-0.01%) ⬇️
python 82.78% <61.90%> (+<0.01%) ⬆️
sqlite 77.52% <42.85%> (+<0.01%) ⬆️
unit 53.05% <42.85%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset/charts/api.py 85.85% <ø> (ø)
superset/dashboards/api.py 92.58% <ø> (ø)
superset/databases/api.py 91.58% <ø> (ø)
superset/datasets/api.py 88.00% <ø> (ø)
superset/extensions/__init__.py 98.86% <0.00%> (ø)
superset/importexport/api.py 100.00% <ø> (ø)
superset/initialization/__init__.py 91.43% <0.00%> (ø)
superset/queries/saved_queries/api.py 92.43% <ø> (ø)
superset/sqllab/api.py 100.00% <ø> (ø)
superset/utils/url_map_converters.py 66.66% <0.00%> (ø)
... and 9 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment thread superset/embedded/view.py
if not embedded:
abort(404)

assert embedded is not None

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Mypy doc:

You can often work around these errors by using assert isinstance(obj, ClassName) or assert obj is not None to tell mypy that you know that the type is more specific than what mypy thinks.

@dpgaspar
dpgaspar merged commit 4a828f5 into apache:master May 12, 2023
@EugeneTorap
EugeneTorap deleted the fix/server/mypy-issue-for-flask-stubs branch May 12, 2023 07:48
@dpgaspar dpgaspar mentioned this pull request May 12, 2023
9 tasks
@mistercrunch mistercrunch added 🍒 2.1.3 Cherry-picked to 2.1.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 First shipped in 3.0.0 labels Mar 8, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.1.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M v2.1 🍒 2.1.3 Cherry-picked to 2.1.3 🚢 3.0.0 First shipped in 3.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants