Skip to content

refactor: replace Any annotations and enforce ANN401 - #257

Merged
pjljvandelaar merged 1 commit into
mainfrom
ruff_ann
Oct 7, 2026
Merged

pjljvandelaar merged 1 commit into
mainfrom
ruff_ann

Conversation

@pjljvandelaar

Copy link
Copy Markdown
Collaborator

Phase 3 of the ANN cleanup: all 25 ANN401 violations are gone, so ANN401 joins the ruff select list and is now enforced by CI instead of merely counted by the lint budget.

Replaces Any with the real types (type, TextSegment, a typed rewrite-action Callable, list[str], dict[str, str]). The parametrized boolean test parameters became keyword-only, as ruff's FBT001 requires; pytest supplies them by keyword. Lowers the ruff budget by 37 and the pyright budget by 12.

Phase 3 of the ANN cleanup: all 25 ANN401 violations are gone, so ANN401 joins the ruff select list and is now enforced by CI instead of merely counted by the lint budget.

Replaces Any with the real types (type, TextSegment, a typed rewrite-action Callable, list[str], dict[str, str]). The parametrized boolean test parameters became keyword-only, as ruff's FBT001 requires; pytest supplies them by keyword. Lowers the ruff budget by 37 and the pyright budget by 12.
@pjljvandelaar
pjljvandelaar merged commit f789f10 into main Oct 7, 2026
10 checks passed
@pjljvandelaar
pjljvandelaar deleted the ruff_ann branch October 7, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant