-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Friendlier error when 3.10 is parsed as float in pyproject.toml #12108
Comments
You need to quote it as |
Changing it to: # Specifies the Python version used to parse and check the target program.
python_version = "3.10" Indeed fixes the problem. In hindsight it makes total sense. Yeah maybe a special message would be a good idea, thank you! |
@hauntsaninja Being a first-time contributor, I would like to work on this issue. Any suggestions on where I can start with? |
@hauntsaninja @jamesbraza |
@radioactive11 @nakatomotoi yes either of you can! Just make a fork of mypy, cut a branch, try to implement a solution + add test(s) proving it works (see |
@jamesbraza Sure! |
@jamesbraza Should I add a special message when the version mentioned has two decimal digits or a general one? |
There should be a message specific to this case (though it should also cover 3.11 and other future versions). |
@hauntsaninja @jamesbraza Hi there, can I still work on this one? |
Description mypy parses the python version as float instead of a string python/mypy#12108
Bug Report
Running mypy with Python 3.10 and
python_version
in the config file has a few wrong behaviors:To Reproduce
Here is a subset of my
pyproject.toml
:I invoke mypy via:
mypy -p namespacepkg
Expected Behavior
Not to raise this message.
Actual Behavior
Your Environment
mypy.ini
(and other config files): see abovepyproject.toml
The text was updated successfully, but these errors were encountered: