You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a package which uses eth_abi, and which lints its code with mypy. Telling mypy to ignore the eth_abi import (import ... # type: ignore) obviously works fine, but when I remove that ignore, I get the following message:
test.py:13: error: Cannot find module named 'eth_abi'
test.py:13: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-imports" flag would help)
The line in question is simply:
from eth_abi import encode_abi
How can it be fixed?
Per PEP 484, include a file py.typed in the package. In my local environment, I was able to solve the problem by simply doing touch ~/.pythonz/lib/python3.7/site-packages/eth_abi-1.2.0-py3.7.egg/eth_abi/py.typed.
The text was updated successfully, but these errors were encountered:
What was wrong?
I have a package which uses
eth_abi
, and which lints its code withmypy
. Tellingmypy
to ignore theeth_abi
import (import ... # type: ignore
) obviously works fine, but when I remove thatignore
, I get the following message:The line in question is simply:
How can it be fixed?
Per PEP 484, include a file
py.typed
in the package. In my local environment, I was able to solve the problem by simply doingtouch ~/.pythonz/lib/python3.7/site-packages/eth_abi-1.2.0-py3.7.egg/eth_abi/py.typed
.The text was updated successfully, but these errors were encountered: