Skip to content

chore: make CI green (ruff lint + format, mypy strict) - #6

Merged
mthamil107 merged 1 commit into
mainfrom
chore/ci-green
Aug 13, 2026
Merged

chore: make CI green (ruff lint + format, mypy strict)#6
mthamil107 merged 1 commit into
mainfrom
chore/ci-green

Conversation

@mthamil107

Copy link
Copy Markdown
Owner

Why

CI has been failing on every push for months — pre-existing lint/format/type debt, unrelated to any feature. This turns all three CI steps green with no behavioral change (full unit suite still passes).

What

ruff check

  • Ignore the ambiguous-unicode rules (RUF001/002/003) — intentional typography (em dashes, curly quotes, arrows) in prose docstrings/comments.
  • Safe autofixes: unused imports, import sorting, stale noqa, collections.abc imports.
  • SIM105contextlib.suppress (×2); one legitimate E402 gets a noqa.

ruff format

  • ruff format across the tree — whitespace only.

mypy (strict)

  • Missing generic args (dict[str, Any], Callable[..., Any]).
  • LangChain HITL overrides matched to the base (Sequence[BaseMessage]) + a messages setter; cast(...) on the Any-returning _dump/_run helpers.
  • langchain_core/mcp added to ignore_missing_imports; disallow_subclassing_any / disallow_untyped_decorators relaxed only for the two optional-dep integration shims (their bases are absent in the lint env, which only installs sqlite-vec).

Verification

All three CI steps were run locally against the CI dependency set (optional deps uninstalled, matching uv sync --group dev --extra sqlite-vec):

  • ruff check . — clean
  • ruff format --check . — clean
  • mypy src/Success: no issues found
  • pytest -m "not integration and not benchmark"396 passed

The (str, Enum) classes keep their existing per-line # noqa: UP042 (StrEnum would change __str__); no runtime code changed.

CI had been red for months on lint/format/type debt unrelated to any
feature. This brings all three CI steps to green with no behavioral change.

ruff:
- ignore the ambiguous-unicode rules (RUF001/002/003) — intentional
  typography (em dashes, curly quotes, arrows) in prose docstrings/comments;
- apply safe autofixes (unused imports, import sorting, stale noqa,
  collections.abc), fix 2x SIM105 (contextlib.suppress) and 1x E402 (noqa).

format:
- apply `ruff format` across the tree (whitespace only).

mypy (strict):
- add missing generic args (dict[str, Any], Callable[..., Any]);
- match the langchain HITL overrides to the base (Sequence[BaseMessage])
  and add a `messages` setter; cast the Any-returning _dump/_run helpers;
- add langchain_core/mcp to ignore_missing_imports and relax
  disallow_subclassing_any / disallow_untyped_decorators for the two
  optional-dep integration shims (their bases are absent in the lint env).

Verified: ruff check + ruff format --check + `mypy src/` all pass with the
CI dependency set (optional deps absent); full unit suite (396) still green.
@mthamil107
mthamil107 merged commit ba70fc6 into main Aug 13, 2026
10 checks passed
@mthamil107
mthamil107 deleted the chore/ci-green branch August 13, 2026 06:05
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