Skip to content

Add no-defaults linting - #3326

Merged
adamtheturtle merged 4 commits into
mainfrom
agent/add-no-defaults-linter
Aug 6, 2026
Merged

Add no-defaults linting#3326
adamtheturtle merged 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
adamtheturtle force-pushed the agent/add-no-defaults-linter branch from 9615df3 to d10b146 Compare August 6, 2026 04:13
adamtheturtle and others added 4 commits August 6, 2026 06:47
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>
Run no-defaults as a local uv hook instead of the upstream pre-commit
hook, matching the other locally-defined hooks. The pin moves to the dev
extra in pyproject.toml, and the hook joins the pre-commit.ci skip list
alongside the other hooks that need project dependencies.

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