Skip to content

[FEATURE] mypy: Module "frozendict" has no attribute "frozendict" #62

@MrCreosote

Description

@MrCreosote
(py3.9playground) ~/virtualenvs/py3.9playground$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic
(py3.9playground) ~/virtualenvs/py3.9playground$ python --version
Python 3.9.6
(py3.9playground) ~/virtualenvs/py3.9playground$ python -c "import frozendict; print(frozendict.__version__)"
2.3.4
(py3.9playground) ~/virtualenvs/py3.9playground$ mypy --version
mypy 0.971 (compiled: yes)
(py3.9playground) ~/virtualenvs/py3.9playground$ cat fdict.py 
from frozendict import frozendict
(py3.9playground) ~/virtualenvs/py3.9playground$ mypy fdict.py 
fdict.py:1: error: Module "frozendict" has no attribute "frozendict"
Found 1 error in 1 file (checked 1 source file)
(py3.9playground) ~/virtualenvs/py3.9playground$ mypy --implicit-reexport fdict.py
fdict.py:1: error: Module "frozendict" has no attribute "frozendict"
Found 1 error in 1 file (checked 1 source file)

From my reading of these issues, the --implicit-reexport flag should cause mypy to ignore this problem, but as you can see, nope. I haven't been able to find any other likely solutions and don't see any issues in the bugtracker here so I thought I'd check and see if anyone knew a workaround for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions