-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
[QUESTION] mypy complaining about missing attributes when importing typer #112
Comments
I am also having this problem. It is my understanding, that since #58 typer should work with mypy out-of-the-box? |
I'm experiencing the same problem. I'm using |
I believe this may be the issue: python/mypy#7030 In short, a recent version of
So I think this issue can be resolved if to: from click.exceptions import Abort as Abort, BadParameter as BadParameter, Exit as Exit |
As a temporary workaround, you can add this section to your project's [mypy-typer.*]
; https://github.com/tiangolo/typer/issues/112
implicit_reexport = True |
I can confirm this fixed typing entirely with typer. Thank you so much! |
Can confirm this workaround fixed it for me too. Thanks! |
Thanks for the discussion here everyone! @victorphoenix3 added support for Available in Typer version |
Confirming it solved the mypy issue. Thanks! |
MyPy strict mode now disallows implicit re-export. See fastapi/typer#112 (comment)
MyPy strict mode now disallows implicit re-export. See fastapi/typer#112 (comment)
MyPy strict mode now disallows implicit re-export. See fastapi/typer#112 (comment)
MyPy strict mode now disallows implicit re-export. See fastapi/typer#112 (comment)
First check
Description
I am trying to use the type types get parsed in mypy. From my experience with mypy, the packages are either supported "out of the box" or not at all and must be ignored.
It's a different issue than #53
I am not sure if I am doing something wrong or this is a bug.
I am using
mypy==0.770
on Python 3.7Thanks,
Jean-Martin
Additional context
mypy command:
mypy error (the line number will not match truncate script below)
mypy config
Truncated code:
Workaround
#112 (comment)
The text was updated successfully, but these errors were encountered: