import os
from typing import Any, Iterable, List, Optional, Sequence, Set, Tuple, Type, Union

from django.apps.config import AppConfig
from django.db.models.base import Model

def popen_wrapper(args: List[str], stdout_encoding: str = ...) -> Tuple[str, str, int]: ...
def handle_extensions(extensions: Iterable[str]) -> Set[str]: ...
def find_command(
    cmd: str,
    path: Optional[Union[str, Iterable[str]]] = ...,
    pathext: Optional[Union[str, Iterable[str]]] = ...,
) -> Optional[str]: ...
def get_random_secret_key() -> str: ...
def parse_apps_and_model_labels(labels: Iterable[str]) -> Tuple[Set[Type[Model]], Set[AppConfig]]: ...
def get_command_line_option(argv: Sequence[Any], option: Any) -> Optional[Any]: ...
def normalize_path_patterns(patterns: Iterable[str]) -> List[str]: ...
def is_ignored_path(path: Union[str, os.PathLike], ignore_patterns: Iterable[str]) -> bool: ...
