Skip to content

Commit 20a03b3

Browse files
committed
add mypy
1 parent 5e78b15 commit 20a03b3

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ repos:
55
hooks:
66
# Run the linter.
77
- id: ruff
8-
args: [ --fix ]
8+
args: [--fix]
99
# Run the formatter.
10-
- id: ruff-format
10+
- id: ruff-format
11+
12+
- repo: https://github.com/pre-commit/mirrors-mypy
13+
rev: v1.9.0
14+
hooks:
15+
- id: mypy
16+
additional_dependencies:
17+
- pydantic>=2,<3.0.0
18+
- langchain_core
19+
- langchain_anthropic
20+
- langchain_openai
21+
- langchain_google_genai
22+
files: ^(src/controlflow/llm/models.py)$
23+
args: [--strict]

mypy.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[mypy]
2+
strict=true
3+
follow_imports = skip
4+
files = 'src/controlflow/llm/models.py', 'tests/llm/test_models.py'

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ dev = [
5757
"pre-commit",
5858
"ruff>=0.3.4",
5959
"textual-dev",
60+
"mypy",
6061
]
6162

6263
[build-system]

0 commit comments

Comments
 (0)