Add new syntax to let the mypy test file syntax anticipate --pretty output
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
The thing that makes #19510 complex is the differences in test output. One possible approach to this is to update the test output to be what it will be if --pretty is enabled. This is complicated by the fact that our current syntax for inline errors in the test data does not actually support what --pretty outputs. Adding that feature could possibly be useful.
(Additionally, https://github.com/python/mypy/issues/19940 should probably be fixed, and https://github.com/python/mypy/pull/19546 merged, before this issue is addressed, if one wants the process to be maximally smooth.)
Huh, it hadn't even occurred to me — there's no syntax for multi-line inline comments, is there? Nor for ignoring subsequent lines of a pretty comment in a test...
Originally posted by @wyattscarpenter in https://github.com/python/mypy/issues/19510#issuecomment-3140992574
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo la sintassi esistente dei test inline-error e le discussioni in #19510, #19940 e PR #19546 per comprendere i vincoli previsti. Definisci e implementa una sintassi per un output pretty su più righe, incluso l'ignorare le righe successive, quindi verifica che i casi di test mypy pertinenti possano esprimere e convalidare l'output di --pretty.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing-qa
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100