Skip to content

Commit 20c4cd0

Browse files
committed
Nothing to check for mypy
1 parent 57e79d8 commit 20c4cd0

File tree

4 files changed

+2
-26
lines changed

4 files changed

+2
-26
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ repos:
2424
rev: 23.3.0
2525
hooks:
2626
- id: black
27-
- repo: https://github.com/pre-commit/mirrors-mypy
28-
rev: v1.7.0
29-
hooks:
30-
- id: mypy
31-
exclude: |
32-
(?x)^(
33-
tests/|
34-
benchmarks/|
35-
\.github/
36-
)
3727
- repo: local
3828
hooks:
3929
- id: cargo-fmt

pyproject.toml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,6 @@ addopts = [
6363
"--import-mode=importlib"
6464
]
6565

66-
[tool.mypy]
67-
exclude=["tests", "benchmarks", ".github"]
68-
namespace_packages = true
69-
explicit_package_bases = true
70-
71-
[[tool.mypy.overrides]]
72-
module = [
73-
"pydantic.*",
74-
"pytest",
75-
]
7666
ignore_missing_imports = true
7767

7868
[tool.coverage.run]

tests/test_guide.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import copy
22
import pickle
3-
from typing import Dict, List, Union
43

54
import pytest
65
from outlines_core import Guide, Index, Vocabulary
@@ -9,8 +8,7 @@
98
@pytest.fixture(scope="session")
109
def index() -> Index:
1110
eos_token_id = 3
12-
# types here only to please mypy checks
13-
tokens: Dict[Union[str, bytes], List[int]] = {"1": [1], "2": [2]}
11+
tokens = {"1": [1], "2": [2]}
1412
regex = r"[1-9]"
1513

1614
vocabulary = Vocabulary(eos_token_id, tokens)

tests/test_index.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import copy
22
import gc
33
import pickle
4-
from typing import Dict, List, Union
54

65
import pytest
76
from outlines_core import Index, Vocabulary
@@ -10,8 +9,7 @@
109
@pytest.fixture(scope="session")
1110
def index() -> Index:
1211
eos_token_id = 3
13-
# types here only to please mypy checks
14-
tokens: Dict[Union[str, bytes], List[int]] = {"1": [1], "2": [2]}
12+
tokens = {"1": [1], "2": [2]}
1513
regex = r"[1-9]"
1614

1715
vocabulary = Vocabulary(eos_token_id, tokens)

0 commit comments

Comments
 (0)