Skip to content

[codex] Tighten Ruff rules and add format check - #14

Merged
hzhaoy merged 1 commit into
mainfrom
codex/ruff-rules-format
Jul 7, 2026
Merged

[codex] Tighten Ruff rules and add format check#14
hzhaoy merged 1 commit into
mainfrom
codex/ruff-rules-format

Conversation

@hzhaoy

@hzhaoy hzhaoy commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add ruff format --check . to CI and README development checks.
  • Expand Ruff linting to explicit B, C4, E, F, I, SIM, and UP rules.
  • Defer line-length cleanup with ignore = ["E501"] so this PR focuses on behavior-preserving quality gates.
  • Run ruff format . across the tree and apply the small rule-driven cleanups needed for the expanded gate.

Validation

  • uv run ruff format --check .
  • uv run ruff check .
  • uv run mypy
  • uv run pytest
  • git diff --check

Expand the Ruff gate to cover import ordering, bugbear, comprehensions, pyupgrade, and simplify rules while deferring line-length cleanup. Add Ruff format checking to CI and normalize the current tree so the new formatter gate starts green.

Constraint: The repository already runs Ruff, mypy, and pytest in CI after PR #13.

Rejected: Enable E501 immediately | the current tree has many long lines, and line-length cleanup would dominate this ruleset PR.

Rejected: Add format check without formatting the tree | CI would fail immediately on existing files.

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep Ruff select/ignore and README check commands aligned with the PR workflow.

Tested: uv run ruff format --check .

Tested: uv run ruff check .

Tested: uv run mypy

Tested: uv run pytest

Tested: git diff --check
@hzhaoy
hzhaoy merged commit ff935d8 into main Jul 7, 2026
1 check passed
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