Closed markedwards closed 3 years ago
Alternatively, from dacite.core import from_dict as from_dict
(yes, the same name repeated).
Alternatively,
from dacite.core import from_dict as from_dict
(yes, the same name repeated).
You can just do from dacite.core import from_dict
. But in any case this should be fixed.
And it turns out that the star import doesn't really work either: https://github.com/python/mypy/issues/10198#issuecomment-855379374
mypy.ini workaround:
# https://github.com/konradhalas/dacite/issues/133
[mypy-dacite]
implicit_reexport = True
I'm also running into this. Thanks for opening the issue.
hi @markedwards - thank you for reporting this issue. Should be fixed in a7834ba2421f6c52be8cd0f787660940deb9fc5b
As the fix is not released on PyPI yet, here is workaround for a pyproject.toml
:
# https://github.com/konradhalas/dacite/issues/133
[[tool.mypy.overrides]]
module = "dacite"
implicit_reexport = true
(adapted from @Akuli)
tests/azure_devops/variable_groups/test_service.py:6: error: Module "lib_team_services_common.azure_devops.services" does not explicitly export attribute "VariableGroupService"; implicit reexport disabled this is the error , would you please help me fixing it
If you try to import
from_dict
withno_implicit_reexport
enabled in mypy, you get an error:This is easily fixed by simply defining
__all__
indacite/__init__.py
. I'm happy to do a PR if it helps.