subtle cache corruption when using dataclass transform leading to `Cannot determine type of "<my-dataclass-transform>" [has-type]` and a big complicated codebase (Pomodouroboros)
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 54
説明
Bug Report
This commit https://github.com/glyph/Pomodouroboros/commit/0d72cbb5079c87e3727a507c7752d1b053665abb prevents a mypy error, while making no semantic changes.
To Reproduce
Unfortunately I cannot construct a minimal reproducer.
- Check out that commit, replace the call to
observify(SessionManager)with@observable()above the declaration ofSessionManager. mypy src/pomodouroboros/model/sessions.py-> no errormypy src/->src/pomodouroboros/model/sessions.py:150: error: Cannot determine type of "observable" [has-type] Found 1 error in 1 file (checked 58 source files)- notice the error.
Expected Behavior
I would expect no error here, or at the very least, the same error with or without running mypy on the rest of the codebase.
Actual Behavior
See above.
Your Environment
- Mypy version used:
mypy 1.19.1 (compiled: yes) - Mypy command-line flags: none
- Mypy configuration options from
mypy.ini(and other config files): see project - Python version used: 3.13.12
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Pomodouroboros のコミットと src/pomodouroboros/model/sessions.py から始め、説明されているとおりに mypy src/pomodouroboros/model/sessions.py と mypy src/ を実行します。報告されている mypy と Python のバージョンを使用して、@observable() の変更がある場合とない場合の結果を比較します。キャッシュ関連のエラーを再現でき、両方の呼び出しスコープで一貫して解消されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100