Automatically detect when uv is being used
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Feature
If .venv/bin/python exists in the root of the project (where the pyproject.toml file is), then automatically use it as the python executable with priority over /usr/bin/python.
Pitch
This feature would make uv work out of the box, instead of a user having to figure out that they need to add --python-executable=.venv/bin/python to the mypy command that they run.
Alternative solutions
There could also be a help note if .venv/bin/python exists and mypy cannot find implementations or library stubs for the majority of the imports, that suggests adding --python-executable=.venv/bin/python to the mypy command.
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, die bestehende Option --python-executable und nachzuverfolgen, wie mypy die Projektwurzel mit pyproject.toml findet. Prüfe das Verhalten, wenn .venv/bin/python vorhanden ist, einschließlich seines Vorrangs gegenüber /usr/bin/python, und ergänze Tests für die automatische Auswahl; fertig ist die Änderung, wenn uv-Projekte ohne die zusätzliche Option funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100