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

✨ Add support for mypy --strict #147

Merged
merged 3 commits into from
Aug 16, 2020
Merged

Conversation

victorphoenix3
Copy link
Contributor

@victorphoenix3 victorphoenix3 commented Jul 29, 2020

Fixes/related to #142

@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #147 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #147   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          242       242           
  Lines         4504      4508    +4     
=========================================
+ Hits          4504      4508    +4     
Impacted Files Coverage Δ
typer/core.py 100.00% <ø> (ø)
typer/models.py 100.00% <ø> (ø)
typer/params.py 100.00% <ø> (ø)
typer/utils.py 100.00% <100.00%> (ø)
docs_src/testing/app01/main.py 100.00% <0.00%> (ø)
docs_src/options/version/tutorial003.py 100.00% <0.00%> (ø)
docs_src/parameter_types/bool/tutorial002.py 100.00% <0.00%> (ø)
docs_src/parameter_types/path/tutorial001.py 100.00% <0.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 c4e3e46...54fa88a. Read the comment docs.

@tiangolo tiangolo merged commit 3cc81b6 into fastapi:master Aug 16, 2020
@tiangolo tiangolo changed the title mypy --strict module re-export related errors ✨ Add support for mypy --strict Aug 16, 2020
@tiangolo
Copy link
Member

Thanks @victorphoenix3 ! 🎉

I went ahead and added a bunch of extra types to enable mypy --strict internally. 🚀

@@ -1,40 +1,37 @@
"""Typer, build great CLIs. Easy to code. Based on Python type hints."""

__version__ = "0.3.1"
from click.exceptions import Abort as Abort

Choose a reason for hiding this comment

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

Why from foo import bar as bar structure is preferred.

Copy link
Member

Choose a reason for hiding this comment

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

That "re-exports" bar and let's tooling know that (instead of being overly t imported to be used internally).

Choose a reason for hiding this comment

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

Hmm ok, thank you.

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.

3 participants