diff --git a/docs/conf.py b/docs/conf.py index 55dcc8d..087bb2f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ sys.path.insert(0, str(cwd / "_ext")) # package data -about: t.Dict[str, str] = {} +about: dict[str, str] = {} with (src_root / "g" / "__about__.py").open() as fp: exec(fp.read(), about) @@ -70,8 +70,8 @@ html_css_files = ["css/custom.css"] html_extra_path = ["manifest.json"] html_theme = "furo" -html_theme_path: t.List[str] = [] -html_theme_options: t.Dict[str, t.Union[str, t.List[t.Dict[str, str]]]] = { +html_theme_path: list[str] = [] +html_theme_options: dict[str, t.Union[str, list[dict[str, str]]]] = { "light_logo": "img/g.svg", "dark_logo": "img/g-dark.svg", "footer_icons": [ @@ -129,7 +129,7 @@ } -def linkcode_resolve(domain: str, info: t.Dict[str, str]) -> t.Union[None, str]: +def linkcode_resolve(domain: str, info: dict[str, str]) -> t.Union[None, str]: """ Determine the URL corresponding to Python object. diff --git a/pyproject.toml b/pyproject.toml index 3506160..445b8e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,13 +125,14 @@ build-backend = "hatchling.build" [tool.mypy] strict = true +python_version = "3.9" files = [ "src/", "tests/", ] [tool.ruff] -target-version = "py38" +target-version = "py39" [tool.ruff.lint] select = [ diff --git a/tests/test_cli.py b/tests/test_cli.py index d3df083..304bb09 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -46,13 +46,13 @@ class CommandLineTestFixture(t.NamedTuple): env: EnvFlag # test data - argv_args: t.List[str] + argv_args: list[str] # results expect_cmd: t.Optional[str] -TEST_FIXTURES: t.List[CommandLineTestFixture] = [ +TEST_FIXTURES: list[CommandLineTestFixture] = [ CommandLineTestFixture( test_id="g-cmd-inside-git-dir", env=EnvFlag.Git, @@ -89,7 +89,7 @@ def test_command_line( # capsys: pytest.CaptureFixture[str], test_id: str, env: EnvFlag, - argv_args: t.List[str], + argv_args: list[str], expect_cmd: t.Optional[str], monkeypatch: pytest.MonkeyPatch, tmp_path: pathlib.Path,