From 1d0a51f5cc11dc595f536935106facc43c520409 Mon Sep 17 00:00:00 2001 From: Mathias Ertl Date: Wed, 30 Aug 2023 13:43:57 +0200 Subject: [PATCH] even more fixes --- ca/django_ca/tests/api/test_utils.py | 2 +- pyproject.toml | 2 +- requirements/requirements-mypy.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ca/django_ca/tests/api/test_utils.py b/ca/django_ca/tests/api/test_utils.py index 88a811786..2b8c483c9 100644 --- a/ca/django_ca/tests/api/test_utils.py +++ b/ca/django_ca/tests/api/test_utils.py @@ -22,7 +22,7 @@ from django_ca.api import utils -@pytest.mark.django_db(transaction=True) +@pytest.mark.django_db def test_doctests() -> None: """Test doctests in the module.""" failures, _tests = doctest.testmod(utils) diff --git a/pyproject.toml b/pyproject.toml index 879168868..8bad0e497 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -190,6 +190,7 @@ strict = true show_error_codes = true mypy_path = "ca/:stubs/:docs/source/" exclude = [ + "dist/", # mypy complains about an extracted wheel "migrations/.*\\.py$", ] plugins = [ @@ -208,7 +209,6 @@ module = [ # psycopg and psycopg_c are not installed in isolated mypy envs (tox, ...) "psycopg", "psycopg_c", - "pytest.*", "pytest_cov.*", "requests.packages.urllib3.response", # semantic-version==2.10.0 does not have typehints. See also: diff --git a/requirements/requirements-mypy.txt b/requirements/requirements-mypy.txt index a1cd26870..340eae9aa 100644 --- a/requirements/requirements-mypy.txt +++ b/requirements/requirements-mypy.txt @@ -1,4 +1,5 @@ -r requirements-dev-common.txt +-r requirements-test.txt # mypy==1.5.0 breaks django-stubs==4.2.3: # https://github.com/typeddjango/django-stubs/issues/1648 mypy==1.4.1