We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc8479e commit 79dd19dCopy full SHA for 79dd19d
commitizen/tags.py
@@ -8,8 +8,6 @@
8
from string import Template
9
from typing import TYPE_CHECKING, NamedTuple
10
11
-from typing_extensions import Self
12
-
13
from commitizen import out
14
from commitizen.defaults import DEFAULT_SETTINGS, Settings, get_tag_regexes
15
from commitizen.git import GitTag
@@ -22,8 +20,16 @@
22
20
)
23
21
24
if TYPE_CHECKING:
+ import sys
+
25
from commitizen.version_schemes import VersionScheme
26
27
+ # Self is Python 3.11+ but backported in typing-extensions
28
+ if sys.version_info < (3, 11):
29
+ from typing_extensions import Self
30
+ else:
31
+ from typing import Self
32
33
34
class VersionTag(NamedTuple):
35
"""Represent a version and its matching tag form."""
0 commit comments