Skip to content
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

python_version should default to the interpreter for python_executable #15341

Open
lordmauve opened this issue Jun 1, 2023 · 0 comments
Open
Labels
feature topic-configuration Configuration files and flags

Comments

@lordmauve
Copy link

Feature

If python_version is omitted and python_executable is set, the Python version is determined by running python_executable.

Currently python_version defaults to the version of Python that is running mypy.

Pitch

This reduces the amount of duplicate configuration needed in some cases.

For example, if mypy is installed with pipx then to run it against a venv you would need

python_executable = ".venv/bin/python3.10"
python_version = "3.10"

We particularly have a desire to avoid duplicating the Python version into lots of places. The target state would be

python_executable = ".venv/bin/python3"

This means that changing the version of Python in use in a project just involves smashing and recreating the venv, instead of configuration changes in mypy.

@AlexWaygood AlexWaygood added the topic-configuration Configuration files and flags label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature topic-configuration Configuration files and flags
Projects
None yet
Development

No branches or pull requests

2 participants