Clarify + validate python_version
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
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 mit der Dokumentation für python_version und der Behandlung der Befehlszeilenoption --python-version, und reproduziere dann das Ausbleiben eines Fehlers bei --python-version 3.100. Erledigt ist die Aufgabe, wenn die Dokumentation die Obergrenze angibt und eine Version außerhalb des gültigen Bereichs abgelehnt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- devtools
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100