[ty] Add new unused-type-ignore-comment rule by MichaReiser · Pull Request #22790 · astral-sh/ruff (original) (raw)
Summary
This PR splits the unused-ignore-comment into two rules:
unused-ignore-commentsame as today, but it now only reports unusedty: ignorecommentsunused-type-ignore-comment: New, reports unusedtype: ignorecomment
The separation allows projects using multiple type checkers to disable unused-type-ignore-comments
so that ty doesn't complain about type: ignore directies that are needed by another type checker.
But they can still use unused-ignore-comments to be warned about unused ty: ignore comments.
Fixes astral-sh/ty#2494
Test Plan
Updated tests