Skip to content

Commit

Permalink
Nothing to check for mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
torymur committed Feb 21, 2025
1 parent 561d50a commit b147dcf
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 26 deletions.
10 changes: 0 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ repos:
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
exclude: |
(?x)^(
tests/|
benchmarks/|
\.github/
)
- repo: local
hooks:
- id: cargo-fmt
Expand Down
10 changes: 0 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ addopts = [
"--import-mode=importlib"
]

[tool.mypy]
exclude=["tests", "benchmarks", ".github"]
namespace_packages = true
explicit_package_bases = true

[[tool.mypy.overrides]]
module = [
"pydantic.*",
"pytest",
]
ignore_missing_imports = true

[tool.coverage.run]
Expand Down
4 changes: 1 addition & 3 deletions tests/test_guide.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import copy
import pickle
from typing import Dict, List, Union

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

vocabulary = Vocabulary(eos_token_id, tokens)
Expand Down
4 changes: 1 addition & 3 deletions tests/test_index.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import copy
import gc
import pickle
from typing import Dict, List, Union

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

vocabulary = Vocabulary(eos_token_id, tokens)
Expand Down

0 comments on commit b147dcf

Please sign in to comment.