Skip to content

Commit 6867ac1

Browse files
committed
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).
1 parent 54d57ad commit 6867ac1

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,17 @@ repos:
5757
hooks:
5858
- id: uv-lock
5959

60-
- repo: https://github.com/pre-commit/mirrors-mypy
61-
rev: v1.16.1
60+
- repo: local
6261
hooks:
6362
- id: mypy
63+
name: mypy
6464
additional_dependencies:
65-
- uv==0.6.2
66-
- mypy
67-
- pytest
68-
- rich
69-
- types-requests
70-
- pydantic
65+
- uv==0.7.8
66+
entry: uv run --group dev --group type_checking mypy
67+
language: python
68+
types: [python]
7169
pass_filenames: false
70+
require_serial: true
7271

7372
# - repo: https://github.com/tcort/markdown-link-check
7473
# rev: v3.11.2

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ type_checking = [
103103
"torchvision", # For multimodal model type checking
104104
"sqlite-vec", # For SQLite vector store type checking
105105
"faiss-cpu", # For Faiss vector store type checking
106+
"lm-format-enforcer", # For constrained generation type checking
106107
"mcp", # For Model Context Protocol tools type checking
107108
"ollama", # For Ollama provider type checking
108-
# Note: lmformatenforcer is not available in PyPI, so it remains an import-not-found error
109109
]
110110
# These are the dependencies required for running unit tests.
111111
unit = [

uv.lock

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)