-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
typing: numpy.__version__ not visible to mypy #18270
Copy link
Copy link
Closed
Milestone
Description
Reproducing code example:
import numpy as np
np.__version__Error message:
mypy tmp.py --python-version=3.7
tmp.py:2: error: Module has no attribute "__version__"; maybe "version"?
Found 1 error in 1 file (checked 1 source file)NumPy/Python version information:
Notice that numpy.__version__ is literally in the issue template! It should be public, typable API:
Output from
'import sys, numpy; print(numpy.__version__, sys.version)'
1.20.0 3.8.2 (default, Nov 4 2020, 21:23:28)
[Clang 12.0.0 (clang-1200.0.32.28)]
Reactions are currently unavailable