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
Mypy installed in a python 3.10 docker container fails to parse a .pyi file with the following error:
usr/local/lib/python3.10/site-packages/numpy/__init__.pyi:636: error: Positional-only parameters are only supported in Python 3.8 and greater
Found 1 error in 1 file (errors prevented further checking)
To Reproduce
docker run -it --rm python:3.10 bash
pip install numpy mypy
Create a test.py with:
import numpy
Run mypy test.py
Expected Behavior
I expect mypy to be able to parse this .pyi file successfully given that it is being run from a python 3.10 interpreter. The error fails because it attempts to parse it with an incompatible version that does not have positional-only parameters.
I am also unable to squash this error because it seems to happen at a stage where errors can't be silenced.
Actual Behavior
The above error occurs. I have tested that this error does not occur in python 3.9. It occurs across multiple operating systems including MacOS and Linux, across both amd64 and arm64 architectures, across multiple versions of mypy, and multiple versions of numpy
Your Environment
Mypy version used: 0.971
Mypy command-line flags: None
Mypy configuration options from mypy.ini (and other config files): None
Python version used: 3.10
Operating system and version: MacOS
The text was updated successfully, but these errors were encountered:
Mypy installed in a python 3.10 docker container fails to parse a
.pyi
file with the following error:To Reproduce
docker run -it --rm python:3.10 bash
pip install numpy mypy
mypy test.py
Expected Behavior
I expect mypy to be able to parse this
.pyi
file successfully given that it is being run from a python 3.10 interpreter. The error fails because it attempts to parse it with an incompatible version that does not have positional-only parameters.I am also unable to squash this error because it seems to happen at a stage where errors can't be silenced.
Actual Behavior
The above error occurs. I have tested that this error does not occur in python 3.9. It occurs across multiple operating systems including MacOS and Linux, across both amd64 and arm64 architectures, across multiple versions of mypy, and multiple versions of numpy
Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: