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

Mypy gives - error: Module has no attribute "Salted" #12

Open
nipunn1313 opened this issue Feb 25, 2022 · 0 comments
Open

Mypy gives - error: Module has no attribute "Salted" #12

nipunn1313 opened this issue Feb 25, 2022 · 0 comments
Assignees

Comments

@nipunn1313
Copy link

I suspect it's because you need to do

from salted.__main__ import Salted as Salted

instead of

from salted.__main__ import Salted

Or typecheckers won't consider it a re-export.
https://www.python.org/dev/peps/pep-0484/#stub-files

I'm not 100% sure - since the pep only makes the claim about stub files. It's pretty easily reproable by setting up

from salted import Salted

And running mypy --strict testfile.py

@RuedigerVoigt RuedigerVoigt self-assigned this Mar 6, 2022
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

No branches or pull requests

2 participants