"""
This type stub file was generated by pyright.
"""

import argparse
from typing import Any, TYPE_CHECKING, TextIO
from sphinx.application import Sphinx
from collections.abc import Sequence

"""Build documentation from a provided source."""
if TYPE_CHECKING:
    ...
def handle_exception(app: Sphinx | None, args: Any, exception: BaseException, stderr: TextIO = ...) -> None:
    ...

def jobs_argument(value: str) -> int:
    """
    Special type to handle 'auto' flags passed to 'sphinx-build' via -j flag. Can
    be expanded to handle other special scaling requests, such as setting job count
    to cpu_count.
    """
    ...

def get_parser() -> argparse.ArgumentParser:
    ...

def make_main(argv: Sequence[str]) -> int:
    """Sphinx build "make mode" entry."""
    ...

def build_main(argv: Sequence[str]) -> int:
    """Sphinx build "main" command-line entry."""
    ...

def main(argv: Sequence[str] = ..., /) -> int:
    ...

if __name__ == '__main__':
    ...
