jazzband / django-model-utils

Django model mixins and utilities.
https://django-model-utils.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.66k stars 365 forks source link

Explicitly re-export names from `__init__` module #591

Closed mthuurne closed 6 months ago

mthuurne commented 6 months ago

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.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

foarsitter commented 6 months ago

I like the gradual improvements, thanks @mthuurne