python / python/mypy

Automatically detect when uv is being used

Ouverte
#18,971 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

feature topic-usability
Langage dominant
Python
Étoiles
20.6k
Forks
3.3k
Métriques de merge des PR
Métriques de PR en attente

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par suivre l’option existante --python-executable et la manière dont mypy localise la racine du projet contenant pyproject.toml. Vérifiez le comportement lorsque .venv/bin/python existe, notamment sa priorité par rapport à /usr/bin/python, et ajoutez une couverture pour la sélection automatique ; le travail est terminé lorsque les projets uv fonctionnent sans l’option supplémentaire.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
tooling
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.