@@ -318,51 +318,95 @@ class Action(_AttributeHolder):
318
318
required : bool
319
319
help : str | None
320
320
metavar : str | tuple [str , ...] | None
321
- def __init__ (
322
- self ,
323
- option_strings : Sequence [str ],
324
- dest : str ,
325
- nargs : int | str | None = None ,
326
- const : _T | None = None ,
327
- default : _T | str | None = None ,
328
- type : Callable [[str ], _T ] | FileType | None = None ,
329
- choices : Iterable [_T ] | None = None ,
330
- required : bool = False ,
331
- help : str | None = None ,
332
- metavar : str | tuple [str , ...] | None = None ,
333
- ) -> None : ...
334
- def __call__ (
335
- self , parser : ArgumentParser , namespace : Namespace , values : str | Sequence [Any ] | None , option_string : str | None = None
336
- ) -> None : ...
337
- if sys .version_info >= (3 , 9 ):
338
- def format_usage (self ) -> str : ...
339
-
340
- if sys .version_info >= (3 , 12 ):
341
- class BooleanOptionalAction (Action ):
342
- @overload
321
+ if sys .version_info >= (3 , 13 ):
343
322
def __init__ (
344
323
self ,
345
324
option_strings : Sequence [str ],
346
325
dest : str ,
347
- default : bool | None = None ,
348
- * ,
326
+ nargs : int | str | None = None ,
327
+ const : _T | None = None ,
328
+ default : _T | str | None = None ,
329
+ type : Callable [[str ], _T ] | FileType | None = None ,
330
+ choices : Iterable [_T ] | None = None ,
349
331
required : bool = False ,
350
332
help : str | None = None ,
333
+ metavar : str | tuple [str , ...] | None = None ,
334
+ deprecated : bool = False ,
351
335
) -> None : ...
352
- @overload
353
- @deprecated ("The `type`, `choices`, and `metavar` parameters are ignored and will be removed in Python 3.14." )
336
+ else :
354
337
def __init__ (
355
338
self ,
356
339
option_strings : Sequence [str ],
357
340
dest : str ,
358
- default : _T | bool | None = None ,
359
- type : Callable [[str ], _T ] | FileType | None = sentinel ,
360
- choices : Iterable [_T ] | None = sentinel ,
341
+ nargs : int | str | None = None ,
342
+ const : _T | None = None ,
343
+ default : _T | str | None = None ,
344
+ type : Callable [[str ], _T ] | FileType | None = None ,
345
+ choices : Iterable [_T ] | None = None ,
361
346
required : bool = False ,
362
347
help : str | None = None ,
363
- metavar : str | tuple [str , ...] | None = sentinel ,
348
+ metavar : str | tuple [str , ...] | None = None ,
364
349
) -> None : ...
365
350
351
+ def __call__ (
352
+ self , parser : ArgumentParser , namespace : Namespace , values : str | Sequence [Any ] | None , option_string : str | None = None
353
+ ) -> None : ...
354
+ if sys .version_info >= (3 , 9 ):
355
+ def format_usage (self ) -> str : ...
356
+
357
+ if sys .version_info >= (3 , 12 ):
358
+ class BooleanOptionalAction (Action ):
359
+ if sys .version_info >= (3 , 13 ):
360
+ @overload
361
+ def __init__ (
362
+ self ,
363
+ option_strings : Sequence [str ],
364
+ dest : str ,
365
+ default : bool | None = None ,
366
+ * ,
367
+ required : bool = False ,
368
+ help : str | None = None ,
369
+ deprecated : bool = False ,
370
+ ) -> None : ...
371
+ @overload
372
+ @deprecated ("The `type`, `choices`, and `metavar` parameters are ignored and will be removed in Python 3.14." )
373
+ def __init__ (
374
+ self ,
375
+ option_strings : Sequence [str ],
376
+ dest : str ,
377
+ default : _T | bool | None = None ,
378
+ type : Callable [[str ], _T ] | FileType | None = sentinel ,
379
+ choices : Iterable [_T ] | None = sentinel ,
380
+ required : bool = False ,
381
+ help : str | None = None ,
382
+ metavar : str | tuple [str , ...] | None = sentinel ,
383
+ deprecated : bool = False ,
384
+ ) -> None : ...
385
+ else :
386
+ @overload
387
+ def __init__ (
388
+ self ,
389
+ option_strings : Sequence [str ],
390
+ dest : str ,
391
+ default : bool | None = None ,
392
+ * ,
393
+ required : bool = False ,
394
+ help : str | None = None ,
395
+ ) -> None : ...
396
+ @overload
397
+ @deprecated ("The `type`, `choices`, and `metavar` parameters are ignored and will be removed in Python 3.14." )
398
+ def __init__ (
399
+ self ,
400
+ option_strings : Sequence [str ],
401
+ dest : str ,
402
+ default : _T | bool | None = None ,
403
+ type : Callable [[str ], _T ] | FileType | None = sentinel ,
404
+ choices : Iterable [_T ] | None = sentinel ,
405
+ required : bool = False ,
406
+ help : str | None = None ,
407
+ metavar : str | tuple [str , ...] | None = sentinel ,
408
+ ) -> None : ...
409
+
366
410
elif sys .version_info >= (3 , 9 ):
367
411
class BooleanOptionalAction (Action ):
368
412
@overload
0 commit comments