Unknown inspection code in an 'ignore' comment
Reports a PyCharm code in a # type: ignore or # pycharm: ignore comment that names no inspection.
A PyCharm code has the pycharm: namespace, as in # type: ignore[pycharm:unsupported-operatr], or it stands in a # pycharm: ignore comment. A code that names no inspection suppresses nothing.
A bare code in # type: ignore, such as mypy's attr-defined, is not reported, because other type checkers use their own codes there. A name that starts with Py and a capital letter is not reported either, because it can name an inspection of another edition or of a disabled plugin.
The quick fix removes the unknown code. The fix is not available when only codes of other type checkers stay, because such a comment suppresses every inspection on its line.
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
PyUnknownIgnoreCode- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection ID: PyUnknownIgnoreCodeInspection
Suppressing Inspection
You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:
More detailed instructions as well as other ways and options that you have can be found in the product documentation:
Inspection Details | |
|---|---|
By default bundled with: | CLion 2026.3, IntelliJ IDEA 2026.3, PyCharm 2026.3, Qodana for JVM 2026.3, |