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

import re

"""Format colored console output."""
_ansi_re: re.Pattern[str] = ...
codes: dict[str, str] = ...
def terminal_safe(s: str) -> str:
    """Safely encode a string for printing to the terminal."""
    ...

def get_terminal_width() -> int:
    """Return the width of the terminal in columns."""
    ...

_tw: int = ...
def term_width_line(text: str) -> str:
    ...

def color_terminal() -> bool:
    ...

def nocolor() -> None:
    ...

def coloron() -> None:
    ...

def colorize(name: str, text: str, input_mode: bool = ...) -> str:
    ...

def strip_colors(s: str) -> str:
    ...

def create_color_func(name: str) -> None:
    ...

_attrs = ...
_colors = ...
_orig_codes = ...
