python_version should default to the interpreter for python_executable
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- Ø Merge
- 1 T. 18 Std.
- Gemergte PRs (30 T.)
- 54
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, mypy's Konfigurationsverarbeitung für python_version und python_executable nachzuverfolgen, und ermittle anschließend, wo die Version des aktuellen Interpreters ausgewählt wird. Überprüfe das Verhalten mit Konfigurationen, die python_version weglassen und python_executable setzen, einschließlich des Beispiels .venv/bin/python3; als erledigt gilt die Aufgabe, wenn die Interpreterversion der ausführbaren Datei verwendet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- devtools
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100