Bug Report
mypy bug.py --disable-error-code=unused-ignore shows
bug.py:1: error: Unused "type: ignore" comment [unused-ignore]
Found 1 error in 1 file (checked 1 source file)
To Reproduce
bug.py
a = 1 # type:ignore[comparison-overlap]
pyproject.toml
[tool.mypy]
enable_error_code = ["unused-ignore"]
Expected Behavior
No error. IMHO, command-line settings should override settings file.
Actual Behavior
See above
Your Environment
- Mypy version used: 1.19.0
- Mypy command-line flags: see above
- Mypy configuration options from
mypy.ini (and other config files): see above
- Python version used: 3.14.0