import os
from pathlib import Path
from typing import (
    Any,
    Final,
)

__all__ = (
    "seed_changelog",
    "edit_for_release",
    "build_package",
    "pretag",
    "print_cheats",
    "get_tag_version",
    "write_version_file",
)
UNRELEASED: Final[str]
SCRIV_START: Final[str]
COPYRIGHT_START_YEAR_FALLBACK: Final[int]
REGEX_COPYRIGHT_LINE: Final[str]

def update_file(fname: str, pattern: str, replacement: str) -> None: ...
def seed_changelog(path_cwd: Path) -> None: ...
def edit_for_release(
    path_cwd: Path,
    kind: str,
    snippet_co: str | None = None,
) -> int | None: ...
def build_package(
    path: Path,
    kind: str,
) -> bool: ...
def pretag(tag: str) -> tuple[bool, str]: ...
def get_current_version(path: Path) -> str | None: ...
def _get_branch() -> str: ...
def print_cheats(path: Path, kind: str, package_name: str | None = None) -> None: ...

class AlterEnv:
    __slots__ = ("_path_cwd", "_pkg_name", "_scm_override_val", "_scm_override_key")
    def __init__(self, path: Path, kind: str) -> None: ...
    def modify_env(self) -> os._Environ[Any]: ...
    @property
    def path_cwd(self) -> Path: ...
    @property
    def scm_key(self) -> str: ...
    @scm_key.setter
    def scm_key(self, val: Any) -> None: ...
    @property
    def scm_val(self) -> str: ...
    @property
    def pkg_name(self) -> str: ...
    @property
    def version_file(self) -> Path: ...
    @version_file.setter
    def version_file(self, val: Any) -> None: ...

def get_tag_version(path: Path) -> str: ...
def write_version_file(path: Path, kind: str, is_test: bool | None = False) -> None: ...
