`--untyped-calls-exclude` does not work with `super()`
未關閉
還沒有人認領這個 Issue。
bug
- 主要語言
- Python
- 星號
- 20.6k
- 分支
- 3.3k
- PR 合併指標
- PR 指標待擷取
描述
Bug Report
--untyped-calls-exclude does not work with super()
To Reproduce
class Super:
def draw(self):
...
class Class(Super):
def draw(self) -> None:
super().draw()
Class().draw()
Expected Behavior
No error.
Actual Behavior
(.venv) C:\Build>mypy --no-incremental --disallow-untyped-calls --untyped-calls-exclude=bug --untyped-calls-exclude=bug.Super --untyped-calls-exclude=bug.Class bug.py
bug.py:7: error: Call to untyped function "draw" in typed context [no-untyped-call]
Found 1 error in 1 file (checked 1 source file)
Your Environment
- Mypy version used: 1.7.1.
- Mypy command-line flags: see above
- Mypy configuration options from
mypy.ini(and other config files): none - Python version used: 3.12.1
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先使用所示的 bug.py 範例重現 issue 中的命令,然後追蹤 --untyped-calls-exclude 如何套用至 super() 呼叫。當範例不產生錯誤,且有一個回歸測試涵蓋被排除的 super() 呼叫時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- devtools
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100