-
-
Notifications
You must be signed in to change notification settings - Fork 684
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
[FEATURE] Add __all__ definition to __init__ #142
Comments
I could work on this! |
If no-one gets to it I'll eventually raise a PR. I was thinking it would be worth a test to verify that the I might have time the weekend after this, but if you're likely to get to it first, by all means go for it. 😄 |
|
this is a probably a duplicate of #112 |
Thanks for the discussion here everyone! @victorphoenix3 added support for Available in Typer version |
@victorphoenix3 Thanks for getting to this! Your implementation is much nicer than anything I would have put together! @tiangolo Thanks for merging, and thanks for the awesome Typer. 👍 |
Is your feature request related to a problem
Yes
When running a fairly strict mypy configuration, mypy complains that the typer module is missing all its attributes.
The solution you would like
We can resolve this by adding a
__all__
definition to the top level init.Describe alternatives you've considered
Using a less strict mypy configuration doesn't yield these errors, but that then allows typing compromises to slip into my code elsewhere.
Additional context
Sample mypy config:
Sample script:
Mypy Errors:
Adding the following to
typer/__init__.py
:Resolves the above error & any others like it.
Typer version: 0.2.1, mypy version: 0.782, python: 3.6.10
The text was updated successfully, but these errors were encountered: