summaryrefslogtreecommitdiff
path: root/src/setuptools_scm/_types.py
blob: fdcd2dd5fc9120ccb6043a870736406e1ab2753d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from __future__ import annotations

import os
from typing import Callable
from typing import List
from typing import Sequence
from typing import Tuple
from typing import TYPE_CHECKING
from typing import Union

from typing_extensions import TypeAlias

if TYPE_CHECKING:
    from . import version

PathT: TypeAlias = Union["os.PathLike[str]", str]

CMD_TYPE: TypeAlias = Union[Sequence[PathT], str]

VERSION_SCHEME: TypeAlias = Union[str, Callable[["version.ScmVersion"], str]]
VERSION_SCHEMES: TypeAlias = Union[List[str], Tuple[str, ...], VERSION_SCHEME]
SCMVERSION: TypeAlias = "version.ScmVersion"