forked from phoenix-oss/llama-stack-mirror
chore: enable mypy pydantic plugin (#1788)
# What does this PR do? Enable mypy pydantic plugin. Since the project heavily relies on pydantic models, it's probably wise to enable the plugin to avoid some potential spurious violation warnings the further we expand mypy coverage for the code base. It should be generally risk-free to enable the plugin for the repo. Some info on what plugin brings to the table: https://docs.pydantic.dev/latest/integrations/mypy/#mypy-plugin-capabilities Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
parent
2f38851751
commit
c8f740353b
1 changed files with 6 additions and 0 deletions
|
@ -152,6 +152,7 @@ ignore = [
|
|||
[tool.mypy]
|
||||
mypy_path = ["llama_stack"]
|
||||
packages = ["llama_stack"]
|
||||
plugins = ['pydantic.mypy']
|
||||
disable_error_code = []
|
||||
warn_return_any = true
|
||||
# # honor excludes by not following there through imports
|
||||
|
@ -304,3 +305,8 @@ exclude = [
|
|||
# packages that lack typing annotations, do not have stubs, or are unavailable.
|
||||
module = ["yaml", "fire"]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.pydantic-mypy]
|
||||
init_forbid_extra = true
|
||||
init_typed = true
|
||||
warn_required_dynamic_aliases = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue