Skip to content

Add no-defaults linting - #2425

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

Add no-defaults linting#2425
adamtheturtle merged 3 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 3 commits August 6, 2026 06:46
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>
@adamtheturtle
adamtheturtle force-pushed the agent/add-no-defaults-linter branch from 2618b9a to 1c35e52 Compare August 6, 2026 05:54
@adamtheturtle
adamtheturtle merged commit 3ec748e into main Aug 6, 2026
16 checks passed
@adamtheturtle
adamtheturtle deleted the agent/add-no-defaults-linter branch August 6, 2026 06:11
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