11from collections .abc import Iterable , Mapping
22from re import Pattern
3- from typing import Any , overload
3+ from typing import Any , Final , overload
44from typing_extensions import TypeAlias
55
66_Option : TypeAlias = tuple [str , str | None , str ]
77_GR : TypeAlias = tuple [list [str ], OptionDummy ]
88
9- longopt_pat : str
10- longopt_re : Pattern [str ]
11- neg_alias_re : Pattern [str ]
12- longopt_xlate : dict [int , int ]
9+ longopt_pat : Final = r"[a-zA-Z](?:[a-zA-Z0-9-]*)"
10+ longopt_re : Final [ Pattern [str ] ]
11+ neg_alias_re : Final [ Pattern [str ] ]
12+ longopt_xlate : Final [ dict [int , int ] ]
1313
1414class FancyGetopt :
1515 def __init__ (self , option_table : list [_Option ] | None = None ) -> None : ...
@@ -25,7 +25,7 @@ def fancy_getopt(
2525 options : list [_Option ], negative_opt : Mapping [_Option , _Option ], object : Any , args : list [str ] | None
2626) -> list [str ] | _GR : ...
2727
28- WS_TRANS : dict [int , str ]
28+ WS_TRANS : Final [ dict [int , str ] ]
2929
3030def wrap_text (text : str , width : int ) -> list [str ]: ...
3131def translate_longopt (opt : str ) -> str : ...
0 commit comments