Skip to content

Commit 825a7a1

Browse files
committedMay 23, 2024
use stubs dir, mypy still failing
1 parent 5ea5920 commit 825a7a1

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed
 
File renamed without changes.
File renamed without changes.

‎pyproject.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ dynamic = ["version"]
3232
[project.urls]
3333
Home = "https://github.com/quantco/multiregex"
3434

35-
[tool.setuptools]
36-
package-dir = { "" = "src" }
37-
3835
[tool.setuptools.packages.find]
39-
include = ["src/multiregex"]
36+
include = ["multiregex"]
4037
namespaces = false
4138

4239
[tool.isort]
@@ -49,10 +46,13 @@ skip_glob = '\.eggs/*,\.git/*,\.venv/*,build/*,dist/*'
4946
default_section = 'THIRDPARTY'
5047

5148
[tool.mypy]
49+
mypy_path = "stubs"
5250
python_version = "3.8"
5351
no_implicit_optional = true
5452
check_untyped_defs = true
5553
allow_redefinition = true
54+
explicit_package_bases = true
55+
exclude = ["docs/"]
5656

5757
[tool.ruff]
5858
line-length = 88
File renamed without changes.

‎tests/test_bench.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pathlib import Path
44

55
from multiregex import RegexMatcher
6-
76
from test_utils import assert_matches_equal
87

98
# Simplistic Python parser
@@ -33,7 +32,7 @@ def test_python_parser():
3332

3433

3534
def test_parse_myself():
36-
myself = Path(__file__).parents[1] / "src" / "multiregex" / "__init__.py"
35+
myself = Path(__file__).parents[1] / "multiregex" / "__init__.py"
3736
with myself.open() as f:
3837
myself_src = f.read().splitlines()
3938
slow_matcher = make_slow_matcher(python_parser.values())

‎tests/test_multiregex.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import re
33

44
import pytest
5-
from multiregex import AhocorasickError, RegexMatcher, generate_prematchers
65

6+
from multiregex import AhocorasickError, RegexMatcher, generate_prematchers
77
from test_utils import assert_matches_equal
88

99

0 commit comments

Comments
 (0)