Skip to content

Commit 20249b6

Browse files
authored
chore: Enable ty unused-ignore-comment rule (#879)
## 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 031c18a commit 20249b6

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
@@ -206,6 +206,9 @@ python-version = "3.10"
206206
include = ["src", "tests", "scripts", "docs", "website"]
207207
exclude = ["website/versioned_docs"]
208208

209+
[tool.ty.rules]
210+
unused-ignore-comment = "error"
211+
209212
[[tool.ty.overrides]]
210213
include = [
211214
"docs/**/*.py",

0 commit comments

Comments
 (0)