Skip to content

Commit 530da18

Browse files
authored
chore: Enable ty unused-ignore-comment rule (#762)
## Summary Now that `ty` supports detecting unused suppression comments (upstream issues [astral-sh/ty#278](astral-sh/ty#278) and [astral-sh/ty#1501](astral-sh/ty#1501) are closed), enable the `unused-ignore-comment` rule project-wide so obsolete `# ty: ignore[...]` comments are caught automatically. Verified that all current `# ty: ignore[...]` suppressions in the codebase are still required (none had to be removed).
1 parent 2e10a65 commit 530da18

2 files changed

Lines changed: 45 additions & 42 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ python-version = "3.11"
186186
include = ["src", "tests", "scripts", "docs", "website"]
187187
exclude = ["website/versioned_docs"]
188188

189+
[tool.ty.rules]
190+
unused-ignore-comment = "error"
191+
189192
[[tool.ty.overrides]]
190193
include = ["docs/**/*.py", "website/**/*.py"]
191194
[tool.ty.overrides.rules]

0 commit comments

Comments
 (0)