import types
from pathlib import Path
from typing import Any

__all__ = (
    "SemVersion",
    "sanitize_tag",
    "get_version",
)

_map_release: types.MappingProxyType[str, str]

def _is_package(package_name: str) -> bool: ...
def _is_setuptools_scm() -> bool: ...
def _path_or_cwd(val: Any | None) -> Path: ...
def get_package_name(path: Path) -> str | None: ...
def _scm_key(prog_name: str) -> str: ...
def _current_tag(path: Path | None = None) -> str | None: ...
def _strip_epoch(ver: str) -> tuple[str | None, str]: ...
def _strip_local(ver: str) -> tuple[str | None, str]: ...
def _remove_v(ver: str) -> str: ...
def sanitize_tag(ver: str) -> tuple[str, str | None]: ...
def get_version(
    ver: str,
    is_use_final: bool = False,
) -> tuple[tuple[int, int, int, str, int], int | None]: ...
def _current_version(path: Path | None = None) -> str | None: ...
def _tag_version(
    next_version: str | None = "",
    path: Path | None = None,
) -> str | None: ...
def _arbritary_version(
    next_version: str,
    path: Path | None = None,
) -> str | None: ...
def _get_app_name(path: Path | None = None) -> str | None: ...

class SemVersion:
    CURRENT_ALIAS_DEFAULT: str = "current"
    CURRENT_ALIASES: tuple[str, str] = ...
    KINDS: tuple[str, str, str] = ...

    def __init__(
        self,
        path: Path | None = None,
        is_use_final: Any | None = False,
    ) -> None: ...
    @classmethod
    def sanitize_kind(cls, kind: str | None = None) -> str: ...
    @property
    def path_cwd(self) -> Path: ...
    @path_cwd.setter
    def path_cwd(self, val: Any) -> None: ...
    @property
    def is_use_final(self) -> bool: ...
    @is_use_final.setter
    def is_use_final(self, val: Any) -> None: ...
    @property
    def major(self) -> int | None: ...
    @property
    def minor(self) -> int | None: ...
    @property
    def micro(self) -> int | None: ...
    @property
    def releaselevel(self) -> str | None: ...
    @releaselevel.setter
    def releaselevel(self, val: str) -> None: ...
    @property
    def releaselevel_abbr(self) -> str: ...
    @property
    def serial(self) -> int | None: ...
    @property
    def dev(self) -> int | None: ...
    @property
    def release(self) -> tuple[int, int, int]: ...
    @staticmethod
    def as_tuple(version_str: str) -> tuple[int | str, ...]: ...
    def parse_ver(self, ver: str, local: str | None = None) -> None: ...
    def version_xyz(self) -> str | None: ...
    def anchor(self) -> str | None: ...
    def readthedocs_url(
        self,
        package_name: str,
        is_latest: bool | None = False,
    ) -> str: ...
    def version_clean(
        self,
        kind: str,
    ) -> str | None: ...
    @property
    def __version__(self) -> str | None: ...
