HTML docs say --strict "[e]nable[s] all optional error checking flags"; it does not
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 90/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
从 docs/source/config_file.rst 开始,该文件似乎会生成受影响的 HTML 文档,并结合其中引用的 mypy --help 输出阅读 strict 选项的措辞。更新该表述,使其准确描述所选的可选错误检查标志,然后验证渲染后的 config_file 文档不再声称所有可选标志都已启用。
由索引模型根据 Issue 内容生成。
描述
Bug Report
The HTML documentation, as of mypy-2.3.1, incorrectly claims that --strict enables all optional error checking flags:
strict
[...]
Enable all optional error checking flags. You can see the list of flags enabled by strict mode in the full mypy --help output.Note: the exact list of flags enabled by strict may change over time.
The second sentence is correct, the first is not. My suggestion would be to change wording to "Enable selected optional error checking flags."
(It appears that the HTML documentation may be generated from docs/source/config_file.rst. This wording is still present in latest, which is currently mypy 2.4.0+dev.0861bb6450d6d3658e44dbca9cd2ba478faf3c1d.)
To Reproduce
As one example, mypy --strict does not enable --enable-error-code=ignore-without-code, as demonstrated by
$ echo '1 == "str" # type: ignore' >/tmp/wrong.py
$ mypy --strict /tmp/wrong.py
Success: no issues found in 1 source file
$ mypy --strict --enable-error-code=ignore-without-code /tmp/wrong.py
/tmp/wrong.py:1: error: "type: ignore" comment without error code (consider "type: ignore[comparison-overlap]" instead) [ignore-without-code]
Found 1 error in 1 file (checked 1 source file)
Your Environment
mypy was run via uv run --isolated --with 'mypy==2.3.1' mypy [...] on Ubuntu 24.04 LTS, with no pyproject.toml in the directory it was run from.
- 主要语言
- Python
- 星标
- 20.6k
- 派生
- 3.3k
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 61
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python/mypy 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug topic-configuration topic-error-reporting
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug topic-attrs
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 1/5 1 小时以内 新手友好度 88/100
qgis/QGIS-Plugins-Website#459 ·
-
bug severity:medium
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
bot-found bug priority: P3
难度 2/5 1-3 小时 新手友好度 84/100
madenvel/KalinkaPlayer#179 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
ls1intum/edutelligence#1098 ·
维护者通常 1 天内回复