chore: resolve pre-commit hook failures and enforce them in CI#155
Merged
Conversation
Fix all ty type check errors surfaced by running pre-commit: - Use MessageRole.USER enum instead of "USER" string literal - Narrow Optional[str] to str before passing to lambda to match Callable[[], str] - Move top-level langgraph/langchain_core imports inside try/except and add ty: ignore for optional deps not in venv - Annotate DummyResponse.headers as Mapping[str, str] to satisfy _ResponseLike protocol - Remove now-stale ty: ignore suppression comments in DMS tests Also replace the individual ruff/ty steps in checks.yaml with a single pre-commit run so the YAML validity and whitespace checks are also enforced in CI alongside formatting and type checking.
dd7b2f6 to
5f00aa5
Compare
ArthurTonial
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
tytype check errors that were blockingpre-commit:MessageRole.USERenum instead of the"USER"string literal in agent memory BDD testassert token is not Nonebeforelambda: tokento narrowOptional[str]tostr(matchesCallable[[], str])langgraph/langchain_coreimports inside thetry/exceptblock in_agent.pyand add# ty: ignore[unresolved-import]for optional deps not present in the venvDummyResponse.headersasMapping[str, str]so it satisfies the_ResponseLikeprotocol# ty: ignoresuppression comments in DMS integration testsruffandtysteps inchecks.yamlwith a singlepre-commit run --all-filesstep, which also enforces YAML validity and trailing-whitespace checks that were previously not covered in CITest plan
VIRTUAL_ENV=.venv pre-commit run --all-files)checks.yamlCI job passes on this PR