python / python/mypy

Semi-verbose flag that shows which files mypy analyzes

Aperta
#7,672 5 commenti 20 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

needs discussion topic-developer topic-usability
Lingua principale
Python
Stelle
20.6k
Fork
3.3k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Sometimes (example: #6385) it's useful to be able to see exactly which files mypy is processing. Currently the only way is to use -v and grep stderr for the word "Parsing".

Maybe this is common enough that we could spare a new command-line flag? It would print all the files for which a BuildSource object is created, and all the files that are reached by following imports (with some indicator of which is which).

The order in which files are printed should reflect the order in which they are processed (not the order in which they are specified).

I wouldn't mind adding extra info for each file (e.g. whether its cache entry is used), as long as it remains a single line per file.

Presumably there's also value in printing certain failures, e.g. modules which can't be found but for which no error message is printed (e.g. through --follow-imports=silent). But I would stop here.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia tracciando l'output esistente di -v che segnala "Parsing" su stderr, quindi esamina dove vengono creati gli oggetti BuildSource e dove vengono seguiti gli import. Il lavoro è completato quando un nuovo flag della riga di comando stampa una riga per ogni file specificato direttamente o importato, nell'ordine di elaborazione, con un indicatore che distingua i due casi; verifica l'output con esecuzioni rappresentative di mypy.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
cli, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.