Skip to content

Commit

Permalink
use stubs dir, mypy still failing
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbe7a committed May 23, 2024
1 parent 5ea5920 commit 825a7a1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ dynamic = ["version"]
[project.urls]
Home = "https://github.com/quantco/multiregex"

[tool.setuptools]
package-dir = { "" = "src" }

[tool.setuptools.packages.find]
include = ["src/multiregex"]
include = ["multiregex"]
namespaces = false

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

[tool.mypy]
mypy_path = "stubs"
python_version = "3.8"
no_implicit_optional = true
check_untyped_defs = true
allow_redefinition = true
explicit_package_bases = true
exclude = ["docs/"]

[tool.ruff]
line-length = 88
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions tests/test_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path

from multiregex import RegexMatcher

from test_utils import assert_matches_equal

# Simplistic Python parser
Expand Down Expand Up @@ -33,7 +32,7 @@ def test_python_parser():


def test_parse_myself():
myself = Path(__file__).parents[1] / "src" / "multiregex" / "__init__.py"
myself = Path(__file__).parents[1] / "multiregex" / "__init__.py"
with myself.open() as f:
myself_src = f.read().splitlines()
slow_matcher = make_slow_matcher(python_parser.values())
Expand Down
2 changes: 1 addition & 1 deletion tests/test_multiregex.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import re

import pytest
from multiregex import AhocorasickError, RegexMatcher, generate_prematchers

from multiregex import AhocorasickError, RegexMatcher, generate_prematchers
from test_utils import assert_matches_equal


Expand Down

0 comments on commit 825a7a1

Please sign in to comment.