From 49f7d9964e126bf22f962982263b2448822becdf Mon Sep 17 00:00:00 2001 From: David Tucker Date: Thu, 15 Oct 2026 12:09:14 -0700 Subject: [PATCH 1/2] Add isort to the static env Keep imports sorted. --- pyproject.toml | 3 +++ src/pytest_mypy/__init__.py | 6 +++--- tests/test_pytest_mypy.py | 2 +- tox.ini | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a6b4118..fada008 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,4 +40,7 @@ mypy = "pytest_mypy" [project.urls] homepage = "https://github.com/realpython/pytest-mypy" +[tool.isort] +profile = "black" + [tool.setuptools_scm] diff --git a/src/pytest_mypy/__init__.py b/src/pytest_mypy/__init__.py index b34887d..4a19aa0 100644 --- a/src/pytest_mypy/__init__.py +++ b/src/pytest_mypy/__init__.py @@ -2,16 +2,16 @@ from __future__ import annotations +import json +import typing from collections.abc import Iterator from dataclasses import dataclass -import json from pathlib import Path from tempfile import NamedTemporaryFile -import typing -from filelock import FileLock import mypy.api import pytest +from filelock import FileLock if typing.TYPE_CHECKING: # pragma: no cover diff --git a/tests/test_pytest_mypy.py b/tests/test_pytest_mypy.py index c18e5c4..820704b 100644 --- a/tests/test_pytest_mypy.py +++ b/tests/test_pytest_mypy.py @@ -3,8 +3,8 @@ import textwrap import mypy.version -from packaging.version import Version import pytest +from packaging.version import Version import pytest_mypy diff --git a/tox.ini b/tox.ini index 1756f61..a1bf48c 100644 --- a/tox.ini +++ b/tox.ini @@ -67,10 +67,12 @@ deps = bandit ~= 1.9.0 black ~= 26.5.0 flake8 ~= 7.3.0 + isort ~= 9.0.0 mypy ~= 2.1.0 pytest-xdist >= 3.6.0 # needed for type-checking commands = black --check --target-version py310 src tests + isort --check src tests flake8 src tests mypy --strict src bandit --recursive src From 72cffe3fffa435539b725681e1e05b7061690f01 Mon Sep 17 00:00:00 2001 From: David Tucker Date: Sun, 18 Oct 2026 08:58:49 -0700 Subject: [PATCH 2/2] Upgrade static deps --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index a1bf48c..74b3398 100644 --- a/tox.ini +++ b/tox.ini @@ -65,10 +65,10 @@ commands = [testenv:static] deps = bandit ~= 1.9.0 - black ~= 26.5.0 - flake8 ~= 7.3.0 + black ~= 26.10.0 + flake8 ~= 7.4.0 isort ~= 9.0.0 - mypy ~= 2.1.0 + mypy ~= 2.4.0 pytest-xdist >= 3.6.0 # needed for type-checking commands = black --check --target-version py310 src tests