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

Enable mypy option no_implicit_reexport #1318

Merged
merged 2 commits into from Feb 8, 2021
Merged

Enable mypy option no_implicit_reexport #1318

merged 2 commits into from Feb 8, 2021

Conversation

jdufresne
Copy link
Member

This option is part of the set of "strict" mypy options, bringing the
project closer to full strict checking.

https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport

By default, imported values to a module are treated as exported and
mypy allows other modules to import them. This flag changes the
behavior to not re-export unless the item is imported using from-as or
is included in __all__.

A side benefit of using __all__ is that it allows removing the flake8
exceptions from the code base. Now __init__.py files are checked too.

Refs: #972

This option is part of the set of "strict" mypy options, bringing the
project closer to full strict checking.

https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport

> By default, imported values to a module are treated as exported and
> mypy allows other modules to import them. This flag changes the
> behavior to not re-export unless the item is imported using from-as or
> is included in `__all__`.

A side benefit of using `__all__` is that it allows removing the flake8
exceptions from the code base. Now `__init__.py` files are checked too.

Refs: #972
@codecov
Copy link

codecov bot commented Feb 7, 2021

Codecov Report

Merging #1318 (5d0ef68) into master (a3515a0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1318   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          33       33           
  Lines        2907     2908    +1     
  Branches      321      321           
=======================================
+ Hits         2895     2896    +1     
  Misses          6        6           
  Partials        6        6           
Impacted Files Coverage Δ
piptools/repositories/__init__.py 100.00% <100.00%> (ø)

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 a3515a0...9b4c4e9. Read the comment docs.

Copy link
Member

@atugushev atugushev left a comment

Choose a reason for hiding this comment

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

Oh, that's useful! Thanks 🙏🏼

@jdufresne jdufresne merged commit f27839c into jazzband:master Feb 8, 2021
@jdufresne jdufresne deleted the reexport branch February 8, 2021 14:51
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