This comes from https://github.com/python/typeshed/pull/11497#discussion_r1507037353 `# pyright:ignore` --> `# pyright: ignore` `# type:ignore` --> `# type: ignore` `# noqa:Y011` --> `# noqa: Y011` This could probably be generalised further, but would likely fall out of scope of `flake8-pyi` Formatters (black and Ruff) already take of adding a space after `#`