From ad6bd214752226cabe82516081e419a95ee29682 Mon Sep 17 00:00:00 2001 From: tristanlatr Date: Wed, 27 Mar 2024 23:44:55 -0400 Subject: [PATCH] Run mypy with python 3.12 --- .github/workflows/static.yaml | 2 +- pydoctor/templatewriter/__init__.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index f36d6d182..3f3927ffd 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -16,7 +16,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.12' - name: Install tox run: | diff --git a/pydoctor/templatewriter/__init__.py b/pydoctor/templatewriter/__init__.py index 78dc0caca..c1b1e18a7 100644 --- a/pydoctor/templatewriter/__init__.py +++ b/pydoctor/templatewriter/__init__.py @@ -16,10 +16,7 @@ def runtime_checkable(f): # Newer APIs from importlib_resources should arrive to stdlib importlib.resources in Python 3.9. if TYPE_CHECKING: - if sys.version_info >= (3, 9): - from importlib.resources.abc import Traversable - else: - Traversable = Any + from importlib.resources.abc import Traversable else: Traversable = object