diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e0d7057d..7caa9adc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: rev: v3.15.0 hooks: - id: pyupgrade - args: ['--py37-plus'] + args: ['--py38-plus'] - repo: https://github.com/psf/black rev: 23.12.1 hooks: diff --git a/src/flask_jsonrpc/types.py b/src/flask_jsonrpc/types.py index 01d09cd7..c6fa15ba 100644 --- a/src/flask_jsonrpc/types.py +++ b/src/flask_jsonrpc/types.py @@ -44,12 +44,6 @@ except ImportError: # pragma: no cover from typing import Literal # type: ignore # pylint: disable=C0412 -# Python 3.8+ -try: - from typing_extensions import Final -except ImportError: # pragma: no cover - from typing import Final # type: ignore # pylint: disable=C0412 - # Python 3.7+ try: from typing import get_args # pylint: disable=C0412 @@ -120,7 +114,7 @@ def check_type(self, o: t.Any) -> bool: # pylint: disable=R0911 if origin_type is Literal: return self.check_args_type(expected_type) - if origin_type is Final: + if origin_type is t.Final: return self.check_args_type(expected_type) expected_type = origin_type