Add new syntax to let the mypy test file syntax anticipate --pretty output
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- Ø Merge
- 1 T. 18 Std.
- Gemergte PRs (30 T.)
- 54
Beschreibung
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
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
Lies zunächst die vorhandene Syntax für inline-error-Tests und die Diskussionen in #19510, #19940 und PR #19546, um die erwarteten Einschränkungen zu verstehen. Definiere und implementiere eine Syntax für mehrzeilige Pretty-Ausgabe, einschließlich des Ignorierens nachfolgender Zeilen, und überprüfe anschließend, dass die relevanten mypy-Testfälle --pretty-Ausgabe ausdrücken und validieren können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- testing-qa
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100