Skip to content

[codex] Add lint and typecheck gates#13

Merged
hzhaoy merged 1 commit into
mainfrom
codex/add-quality-checks
Jul 7, 2026
Merged

[codex] Add lint and typecheck gates#13
hzhaoy merged 1 commit into
mainfrom
codex/add-quality-checks

Conversation

@hzhaoy

@hzhaoy hzhaoy commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Ruff and mypy to the dev dependency group and lockfile.
  • Add CI steps for uv run ruff check . and uv run mypy before pytest.
  • Configure Ruff target version and source-level mypy checks with check_untyped_defs.
  • Repair the existing lint/type baseline so the new gates pass cleanly.
  • Document the local quality check commands in the README.

Validation

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

Introduce Ruff linting and source-level mypy checking to the PR workflow, then repair the existing baseline so the new quality gates pass cleanly. Document the local commands alongside the existing pytest check.

Constraint: CI currently installs the dev dependency group before running checks.

Rejected: Add mypy with broad ignores | would create a weak gate that passes without checking the current source baseline.

Rejected: Typecheck tests immediately | source-level checking gives a smaller first gate while tests remain covered by Ruff and pytest.

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Keep CI lint/typecheck commands aligned with the README Development Checks section.

Tested: uv run ruff check .

Tested: uv run mypy

Tested: uv run pytest

Tested: git diff --check
@hzhaoy
hzhaoy merged commit c7ee241 into main Jul 7, 2026
1 check passed
@hzhaoy
hzhaoy deleted the codex/add-quality-checks branch July 7, 2026 02:19
hzhaoy added a commit that referenced this pull request Jul 7, 2026
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
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