diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 515094d..5c0458f 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -24,7 +24,6 @@ jobs: include: - tox_env: check-manifest - tox_env: lint - - tox_env: mypy - tox_env: py39 - tox_env: py310 - tox_env: py311 diff --git a/mypy.ini b/mypy.ini index 6b958c4..b63cb2d 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,4 +1,5 @@ [mypy] +files = pdfss show_error_codes = true [mypy-pdfminer.*] diff --git a/pyproject.toml b/pyproject.toml index 0fb5f2b..6939360 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,15 @@ dependencies = [ "pdfminer.six", ] +[project.optional-dependencies] +test = [ + "pytest", + "pytest-cov", +] +typing = [ + "mypy", +] + [project.urls] Source = "https://github.com/lowatt/pdfss" Tracker = "https://github.com/lowatt/pdfss/issues" diff --git a/tox.ini b/tox.ini index 0fa0c89..8d612ba 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,14 @@ [tox] isolated_build = true envlist = - check-manifest,lint,py3,mypy + check-manifest,lint,py3 [testenv] -deps = - pytest - pytest-cov +extras = + test + typing commands = + mypy {envpython} -m pytest {posargs:--cov pdfss --cov-report term --cov-fail-under 88} [testenv:lint] @@ -34,10 +35,3 @@ deps = check-manifest commands = {envpython} -m check_manifest {toxinidir} - - -[testenv:mypy] -deps = - mypy -commands = - {envpython} -m mypy pdfss