-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
The Python docs for python_version say:
Specifies the Python version used to parse and check the target program. The string should be in the format MAJOR.MINOR – for example 3.9. The default is the version of the Python interpreter used to run mypy.
My understanding was that you could even target a newer version of Python than the one that installed mypy, and that mypy implemented its own Python parser or something. But it seems like python_version only supports specifying older Python versions; i.e. only enables restricting syntax, not enabling syntax.
But what was even more confusing was that specifying --python-version 3.100 didn't show any errors.
I think the following changes would be good:
- Clarify the documentation to say that python_version is upper bounded to the version of Python running mypy
- Error if python_version is greater than the version of Python running mypy