diff --git a/pyproject.toml b/pyproject.toml index 5b93edb..0e41137 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ envs.docs.scripts.clean = "git clean -fdX -- {args:docs}" envs.hatch-test.dependency-groups = [ "dev", "test" ] envs.hatch-test.matrix = [ # Test the lowest and highest supported Python versions with normal deps - { deps = [ "stable" ], python = [ "3.12", "3.14" ] }, + { deps = [ "stable" ], python = [ "3.12", "3.13", "3.14" ] }, # Test the newest supported Python version also with pre-release deps { deps = [ "pre" ], python = [ "3.14" ] }, ] diff --git a/tests/test_settings.py b/tests/test_settings.py index e92bc60..710f3e0 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -171,21 +171,22 @@ def test_override_docs(docstring_style: Literal["google", "numpy"], settings: Du ("attr", "expected"), [ pytest.param("string", "str", id="builtin"), - pytest.param("path", "pathlib.Path", id="3rd-party"), + pytest.param("pattern", "re.Pattern[str]", id="import"), # same module as `S`, so no leading `tests.test_settings.` pytest.param("local", "test_annotation_format..Local", id="same-module"), ], ) def test_annotation_format(attr: str, expected: str) -> None: """Test that annotation references work correctly.""" + import re class Local: ... class S(Settings, exported_object_name="s", docstring_style="google"): if attr == "string": string: str - if attr == "path": - path: Path + if attr == "pattern": + pattern: re.Pattern[str] if attr == "local": local: Local