Add no-defaults linting - #3326
Open
adamtheturtle wants to merge 4 commits into
Open
Conversation
adamtheturtle
marked this pull request as ready for review
August 5, 2026 18:30
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
no-defaultsv1.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: NOD001comments where necessary; Ruff is configured to recognize the externalNODrule family. Vendored Typeshed is excluded where applicable.Validated with
prek validate-config,prek run no-defaults --all-files, and Ruff checks.