diff --git a/stdlib/optparse.pyi b/stdlib/optparse.pyi index 6096ac4a2a1d..74bda7e08ac8 100644 --- a/stdlib/optparse.pyi +++ b/stdlib/optparse.pyi @@ -62,9 +62,11 @@ class HelpFormatter: max_help_position: int option_strings: dict[Option, str] parser: OptionParser - short_first: Incomplete + short_first: bool | Literal[0, 1] width: int - def __init__(self, indent_increment: int, max_help_position: int, width: int | None, short_first: int) -> None: ... + def __init__( + self, indent_increment: int, max_help_position: int, width: int | None, short_first: bool | Literal[0, 1] + ) -> None: ... def dedent(self) -> None: ... def expand_default(self, option: Option) -> str: ... def format_description(self, description: str | None) -> str: ... @@ -83,14 +85,22 @@ class HelpFormatter: class IndentedHelpFormatter(HelpFormatter): def __init__( - self, indent_increment: int = 2, max_help_position: int = 24, width: int | None = None, short_first: int = 1 + self, + indent_increment: int = 2, + max_help_position: int = 24, + width: int | None = None, + short_first: bool | Literal[0, 1] = 1, ) -> None: ... def format_heading(self, heading: str) -> str: ... def format_usage(self, usage: str) -> str: ... class TitledHelpFormatter(HelpFormatter): def __init__( - self, indent_increment: int = 0, max_help_position: int = 24, width: int | None = None, short_first: int = 0 + self, + indent_increment: int = 0, + max_help_position: int = 24, + width: int | None = None, + short_first: bool | Literal[0, 1] = 0, ) -> None: ... def format_heading(self, heading: str) -> str: ... def format_usage(self, usage: str) -> str: ...