chore(mypy): add mypy type hints to distributions and testing modules#5404
Open
Elbehery wants to merge 1 commit intollamastack:mainfrom
Open
chore(mypy): add mypy type hints to distributions and testing modules#5404Elbehery wants to merge 1 commit intollamastack:mainfrom
Elbehery wants to merge 1 commit intollamastack:mainfrom
Conversation
28f3d5a to
3e1ddf4
Compare
3421c11 to
b11eabe
Compare
leseb
requested changes
Apr 2, 2026
Collaborator
leseb
left a comment
There was a problem hiding this comment.
let's not rename variables if not necessary
b11eabe to
fc58a62
Compare
Contributor
Author
fixed 👍🏽 |
Add type hints to make the following files pass strict mypy checking: - src/llama_stack/distributions/template.py: Add explicit type annotations to filtered dict and list variables, cast jinja2 render return value to str, add cast to typing imports - src/llama_stack/testing/api_recorder.py: Add string annotation for ResponseStorage forward reference, add type annotation for headers dict, add assertion for non-None storage, add type: ignore[method-assign] comments for all method monkey-patching operations Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
fc58a62 to
0014d95
Compare
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 does this PR do?
Add type hints to make the following files pass strict mypy checking:
cc @leseb