@@ -2,7 +2,7 @@ import sys
22from _typeshed import SupportsWrite , sentinel
33from collections .abc import Callable , Generator , Iterable , Sequence
44from re import Pattern
5- from typing import IO , Any , ClassVar , Final , Generic , NewType , NoReturn , Protocol , TypeVar , overload
5+ from typing import IO , Any , ClassVar , Final , Generic , NoReturn , Protocol , TypeVar , overload
66from typing_extensions import Self , TypeAlias , deprecated
77
88__all__ = [
@@ -36,9 +36,7 @@ ONE_OR_MORE: Final = "+"
3636OPTIONAL : Final = "?"
3737PARSER : Final = "A..."
3838REMAINDER : Final = "..."
39- _SUPPRESS_T = NewType ("_SUPPRESS_T" , str )
40- SUPPRESS : _SUPPRESS_T | str # not using Literal because argparse sometimes compares SUPPRESS with is
41- # the | str is there so that foo = argparse.SUPPRESS; foo = "test" checks out in mypy
39+ SUPPRESS : Final = "==SUPPRESS=="
4240ZERO_OR_MORE : Final = "*"
4341_UNRECOGNIZED_ARGS_ATTR : Final = "_unrecognized_args" # undocumented
4442
@@ -81,7 +79,7 @@ class _ActionsContainer:
8179 # more precisely, Literal["?", "*", "+", "...", "A...", "==SUPPRESS=="],
8280 # but using this would make it hard to annotate callers that don't use a
8381 # literal argument and for subclasses to override this method.
84- nargs : int | str | _SUPPRESS_T | None = None ,
82+ nargs : int | str | None = None ,
8583 const : Any = ...,
8684 default : Any = ...,
8785 type : _ActionType = ...,
@@ -283,13 +281,7 @@ class HelpFormatter:
283281
284282 if sys .version_info >= (3 , 14 ):
285283 def __init__ (
286- self ,
287- prog : str ,
288- indent_increment : int = 2 ,
289- max_help_position : int = 24 ,
290- width : int | None = None ,
291- prefix_chars : str = "-" ,
292- color : bool = False ,
284+ self , prog : str , indent_increment : int = 2 , max_help_position : int = 24 , width : int | None = None , color : bool = False
293285 ) -> None : ...
294286 else :
295287 def __init__ (
0 commit comments