mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
chore: add lm-format-enforcer and update pre-commit mypy hook
Add lm-format-enforcer to type_checking dependencies and update the pre-commit mypy hook to use local repo with uv run --group dev --group type_checking for better integration with dependency groups. This reduces mypy errors from 73 to 58 (one additional error fixed).
This commit is contained in:
parent
0ed017c1a3
commit
4d58147522
3 changed files with 34 additions and 9 deletions
|
|
@ -57,18 +57,17 @@ repos:
|
|||
hooks:
|
||||
- id: uv-lock
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.16.1
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy
|
||||
additional_dependencies:
|
||||
- uv==0.6.2
|
||||
- mypy
|
||||
- pytest
|
||||
- rich
|
||||
- types-requests
|
||||
- pydantic
|
||||
- uv==0.7.8
|
||||
entry: uv run --group dev --group type_checking mypy
|
||||
language: python
|
||||
types: [python]
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
|
||||
# - repo: https://github.com/tcort/markdown-link-check
|
||||
# rev: v3.11.2
|
||||
|
|
|
|||
|
|
@ -103,9 +103,9 @@ type_checking = [
|
|||
"torchvision", # For multimodal model type checking
|
||||
"sqlite-vec", # For SQLite vector store type checking
|
||||
"faiss-cpu", # For Faiss vector store type checking
|
||||
"lm-format-enforcer", # For constrained generation type checking
|
||||
"mcp", # For Model Context Protocol tools type checking
|
||||
"ollama", # For Ollama provider type checking
|
||||
# Note: lmformatenforcer is not available in PyPI, so it remains an import-not-found error
|
||||
]
|
||||
# These are the dependencies required for running unit tests.
|
||||
unit = [
|
||||
|
|
|
|||
26
uv.lock
generated
26
uv.lock
generated
|
|
@ -1653,6 +1653,15 @@ wheels = [
|
|||
{ url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "interegular"
|
||||
version = "0.3.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/dc/9d/8b6dde58a028a3962ce17e84d5fe73758df61378e00ef8ac3d85da34b0ff/interegular-0.3.3.tar.gz", hash = "sha256:d9b697b21b34884711399ba0f0376914b81899ce670032486d0d048344a76600", size = 24705, upload-time = "2024-01-06T23:01:22.372Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c4/01/72d6472f80651673716d1deda2a5bbb633e563ecf94f4479da5519d69d25/interegular-0.3.3-py37-none-any.whl", hash = "sha256:b0c07007d48c89d6d19f7204972d369b2a77222722e126b6aa63aa721dc3b19c", size = 23635, upload-time = "2024-01-06T23:01:20.829Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ipykernel"
|
||||
version = "6.30.0"
|
||||
|
|
@ -2034,6 +2043,7 @@ type-checking = [
|
|||
{ name = "datasets" },
|
||||
{ name = "fairscale" },
|
||||
{ name = "faiss-cpu" },
|
||||
{ name = "lm-format-enforcer" },
|
||||
{ name = "mcp" },
|
||||
{ name = "nest-asyncio" },
|
||||
{ name = "ollama" },
|
||||
|
|
@ -2178,6 +2188,7 @@ type-checking = [
|
|||
{ name = "datasets" },
|
||||
{ name = "fairscale" },
|
||||
{ name = "faiss-cpu" },
|
||||
{ name = "lm-format-enforcer" },
|
||||
{ name = "mcp" },
|
||||
{ name = "nest-asyncio" },
|
||||
{ name = "ollama" },
|
||||
|
|
@ -2245,6 +2256,21 @@ wheels = [
|
|||
{ url = "https://files.pythonhosted.org/packages/96/27/1c65035ce58100be22409c98e4d65b1cdaeff7811ea968f9f844641330d7/llama_stack_client-0.3.0-py3-none-any.whl", hash = "sha256:9f85d84d508ef7da44b96ca8555d7783da717cfc9135bab6a5530fe8c852690d", size = 425234, upload-time = "2025-10-21T23:58:24.246Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lm-format-enforcer"
|
||||
version = "0.11.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "interegular" },
|
||||
{ name = "packaging" },
|
||||
{ name = "pydantic" },
|
||||
{ name = "pyyaml" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/84/d5/41cd417ba7dfdbbcfe46cebf81fb3dfd7c591b89897560ad05bb410a465d/lm_format_enforcer-0.11.3.tar.gz", hash = "sha256:e68081c108719cce284a9bcc889709b26ffb085a1945b5eba3a12cfa96d528da", size = 40258, upload-time = "2025-08-24T19:37:47.527Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a0/ef/11292bb0b85cf4c93447cab5a29f64576ed14d3ab4280e35ddd23486594a/lm_format_enforcer-0.11.3-py3-none-any.whl", hash = "sha256:cf586350875def1ae7a8fba84fcbbfc8371424b6c9d05c1fcba70aa233fbf06f", size = 45418, upload-time = "2025-08-24T19:37:46.325Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "locust"
|
||||
version = "2.40.1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue