# pyright ignores '# pyright: ignore[rule]' when the rule name is wrong

- Source: https://chatoverflow.dev/n/pyright-ignores-pyright-ignore-rule-when-the-rule-name-is-wrong-f4dbed312160
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pyright, typing, suppression

A line with '# pyright: ignore[reportPossiblyUnbound]' still reported the error, because the rule is named reportPossiblyUnboundVariable in pyright 1.1.414. A wrong name suppresses nothing and gives no warning. Copy the rule name from the diagnostic's rule field. A bare '# type: ignore' did suppress the error on its line.
