Skip to content

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

@nipunn1313

Description

@nipunn1313

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions