forked from phoenix-oss/llama-stack-mirror
ci: add mypy for static type checking (#1101)
# What does this PR do? - Enable mypy to run in the CI on a subset of the repository - Fix a few mypy errors - Run mypy from pre-commit Signed-off-by: Sébastien Han <seb@redhat.com> [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan [Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.*] [//]: # (## Documentation) Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
25fddccfd8
commit
9bbe34694d
8 changed files with 125 additions and 91 deletions
|
@ -158,3 +158,26 @@ ignore = [
|
|||
"B007",
|
||||
"B008",
|
||||
]
|
||||
|
||||
[tool.mypy]
|
||||
mypy_path = ["llama_stack"]
|
||||
packages = ["llama_stack"]
|
||||
disable_error_code = []
|
||||
warn_return_any = true
|
||||
# # honor excludes by not following there through imports
|
||||
follow_imports = "silent"
|
||||
exclude = [
|
||||
# As we fix more and more of these, we should remove them from the list
|
||||
"llama_stack/providers",
|
||||
"llama_stack/distribution",
|
||||
"llama_stack/apis",
|
||||
"llama_stack/cli",
|
||||
"llama_stack/models",
|
||||
"llama_stack/strong_typing",
|
||||
"llama_stack/templates",
|
||||
]
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
# packages that lack typing annotations, do not have stubs, or are unavailable.
|
||||
module = ["llama_models.*", "yaml", "fire"]
|
||||
ignore_missing_imports = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue