File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
3
import re
4
+ import sys
4
5
import warnings
5
6
from collections .abc import Sequence
6
7
from dataclasses import dataclass , field
7
8
from functools import cached_property
8
9
from string import Template
9
10
from typing import TYPE_CHECKING , NamedTuple
10
11
11
- from typing_extensions import Self
12
-
13
12
from commitizen import out
14
13
from commitizen .defaults import DEFAULT_SETTINGS , Settings , get_tag_regexes
15
14
from commitizen .git import GitTag
24
23
if TYPE_CHECKING :
25
24
from commitizen .version_schemes import VersionScheme
26
25
26
+ # Self is Python 3.11+ but backported in typing-extensions
27
+ if sys .version_info < (3 , 11 ):
28
+ from typing_extensions import Self
29
+ else :
30
+ from typing import Self
31
+
27
32
28
33
class VersionTag (NamedTuple ):
29
34
"""Represent a version and its matching tag form."""
You can’t perform that action at this time.
0 commit comments