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

Explicitly re-export names from __init__ module #591

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

mthuurne
Copy link
Contributor

By listing names intended for export in the __all__ module-level variable, static code checkers like mypy are able to verify that importing a name from a module that itself imported it is by design rather than by accident.

As flake8 understand __all__, this also removes the need for warning suppression comments.

Both mypy and flake8 understand `__all__`, removing the need for
warning suppression comments.
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.57%. Comparing base (fe1d0c6) to head (00e52e8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #591   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files           6        6           
  Lines         772      773    +1     
=======================================
+ Hits          761      762    +1     
  Misses         11       11           

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

@mthuurne mthuurne mentioned this pull request Mar 22, 2024
@foarsitter foarsitter merged commit d51f5c7 into jazzband:master Mar 22, 2024
9 checks passed
@foarsitter
Copy link
Contributor

I like the gradual improvements, thanks @mthuurne

@mthuurne mthuurne deleted the explicit-reexport branch March 22, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants