diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7fc7106f..53c115db 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,7 @@ repos: # More information can be found in its documentation: # https://docs.astral.sh/ruff/ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.1 + rev: v0.8.3 hooks: - id: ruff # Fix what can be fixed in-place and exit with non-zero status if files were diff --git a/ci_cd/utils/versions.py b/ci_cd/utils/versions.py index 48a60b97..09e57fb9 100644 --- a/ci_cd/utils/versions.py +++ b/ci_cd/utils/versions.py @@ -14,8 +14,14 @@ from ci_cd.exceptions import InputError, InputParserError, UnableToResolve if TYPE_CHECKING: # pragma: no cover + import sys from typing import Any, Dict, List + if sys.version_info >= (3, 11): + from typing import Self + else: + from typing_extensions import Self + from packaging.requirements import Requirement from typing_extensions import Literal