(🐞) crash with `--pretty` from attrs raising an error in the wrong file
オープン
まだ誰も着手していません。
crash
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- PR マージ指標
- PR 指標を取得中
説明
> 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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue のセットアップコマンドに従った後、mypy --strict --check-untyped-defs --pretty でクラッシュを再現します。mypy/errors.py、特に format_messages と file_messages から調査を始め、報告された位置を ddtrace/profiling/collector/threading.py のエラーと比較します。--pretty が IndexError なしで完了し、有効な位置を報告すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100