Skip to content

Add no-defaults linting - #3326

Open
adamtheturtle wants to merge 4 commits into
mainfrom
agent/add-no-defaults-linter
Open

Add no-defaults linting#3326
adamtheturtle wants to merge 4 commits into
mainfrom
agent/add-no-defaults-linter

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

Add no-defaults v1.0.0 to the pre-commit/prek configuration.

The policy rejects defaults everywhere in tests/** and for private functions, classes, and modules elsewhere. Existing defaults are behavior-preservingly baselined with targeted # noqa: NOD001 comments where necessary; Ruff is configured to recognize the external NOD rule family. Vendored Typeshed is excluded where applicable.

Validated with prek validate-config, prek run no-defaults --all-files, and Ruff checks.

@adamtheturtle
adamtheturtle marked this pull request as ready for review August 5, 2026 18:30
adamtheturtle and others added 2 commits August 5, 2026 23:14
Picks up the fix for annotated locals in dataclass methods being
misreported as fields (adamtheturtle/no-defaults#6).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Remove the "application/json" defaults from _add_target_to_vws and
_update_target rather than suppressing NOD001, and pass the value
explicitly at the 21 call sites that relied on them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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