ci: add typecheck and test workflow - #17
Merged
Merged
Conversation
mypy, newly wired into CI, found: - Eight BaseTool subclasses declared execute() signatures incompatible with the abstract method, so a caller holding a BaseTool could not satisfy them. Arguments arrive as a dict parsed from the model's tool call, so the base signature is now open rather than the subclasses being wrong. - LLMClient.chat declared -> dict but returns a generator when stream=True. Added overloads so the return type follows the stream flag. - Message.to_dict assigned a list into a dict inferred as dict[str, str]. - _parse_ddg_html needed an annotation on its accumulator. Verified locally: mypy clean over 20 files, 50 tests pass.
Owner
Author
|
Since this PR introduces mypy, it also carries the fixes for what mypy found on the first run — otherwise the check would land red on day one. These were pre-existing latent defects, not new ones. The most consequential across the three repos was treating a chat model's CI is green on this branch: typecheck and tests both pass. |
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.
What
Adds a
CIworkflow running typecheck and tests on every pull request and on pushes to the default branch.Why
These repos had no automated checks at all. The automated improvement workflow opens PRs against them, and nothing verified that the proposed code compiled or passed tests before review.
Runs mypy (
--ignore-missing-imports) and pytest on Python 3.11.