(🐞) crash with `--pretty` from attrs raising an error in the wrong file
Offen
Dieses Issue hat noch niemand übernommen.
crash
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
> git clone https://github.com/DataDog/dd-trace-py
> cd dd-trace-py
> pip install -e .
> pip install mypy
> mypy --strict --check-untyped-defs | grep threading.py
ddtrace/profiling/collector/threading.py:25: error: Need type annotation for "recorder" [var-annotated]
ddtrace/profiling/collector/threading.py:29: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
ddtrace/profiling/collector/threading.py:316: error: Need type annotation for "tracer" [var-annotated]
> mypy --strict --check-untyped-defs --pretty
...
File "mypy/main.py", line 100, in main
File "mypy/main.py", line 182, in run_build
File "mypy/build.py", line 192, in build
File "mypy/build.py", line 266, in _build
File "mypy/build.py", line 2942, in dispatch
File "mypy/build.py", line 3340, in process_graph
File "mypy/build.py", line 3465, in process_stale_scc
File "mypy/errors.py", line 915, in file_messages
File "mypy/errors.py", line 885, in format_messages
IndexError: list index out of range
threading.py:316: error, threading only has 43 lines in it.
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
Reproduziere den Absturz mit mypy --strict --check-untyped-defs --pretty, nachdem du die Setup-Befehle im Issue ausgeführt hast. Beginne in mypy/errors.py, insbesondere bei format_messages und file_messages, und vergleiche die gemeldete Position mit den Fehlern aus ddtrace/profiling/collector/threading.py; abgeschlossen ist die Aufgabe, wenn --pretty ohne einen IndexError abgeschlossen wird und gültige Positionen meldet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 35/100