Skip to content

Modernise ruff configuration#75

Merged
phinate merged 1 commit into
mainfrom
modernise-ruff-config
Mar 20, 2026
Merged

Modernise ruff configuration#75
phinate merged 1 commit into
mainfrom
modernise-ruff-config

Conversation

@phinate

@phinate phinate commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Simplify rule selection to core best-practice set: E, W, F, I, UP, B, SIM, C4, PT, G, PGH, RUF
  • Add target-version templated from min_python_version
  • Add isort known-first-party config
  • Remove legacy isort.required-imports, typing-conditional config, and overly broad rule sets

This was originally merged as PR #65 but targeted the wrong base branch. Cherry-picked onto main.

Test plan

  • CI passes (generated project validates with new ruff config)

🤖 Generated with Claude Code

* feat: modernise ruff configuration

- Simplify rule selection to core best-practice set
- Add target-version templated from min_python_version
- Add per-file-ignores for tests
- Add isort known-first-party config
- Configure format quote-style and indent-style
- Remove legacy isort.required-imports and typing-conditional config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: restore unfixable rules and clean up ruff config

- Restore unfixable F401/F841 to protect re-exports and flag unused vars
- Remove no-op per-file-ignores (S101, D not in select)
- Remove redundant quote-style/indent-style (already defaults)
- Restore docstring-code-format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add PGH, G, and PT rule sets to ruff config

- PGH: catches blanket type: ignore and noqa without codes
- G: enforces lazy logging format strings
- PT: pytest style conventions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@phinate phinate merged commit 1a1d58f into main Mar 20, 2026
1 check failed
@phinate phinate deleted the modernise-ruff-config branch March 20, 2026 20:21
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