mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
[argparse] Deprecate prefix_chars in ArgumentParser.add_argument_group (#14428)
This commit is contained in:
+34
-10
@@ -495,16 +495,40 @@ else:
|
||||
class _ArgumentGroup(_ActionsContainer):
|
||||
title: str | None
|
||||
_group_actions: list[Action]
|
||||
def __init__(
|
||||
self,
|
||||
container: _ActionsContainer,
|
||||
title: str | None = None,
|
||||
description: str | None = None,
|
||||
*,
|
||||
prefix_chars: str = ...,
|
||||
argument_default: Any = ...,
|
||||
conflict_handler: str = ...,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@overload
|
||||
def __init__(
|
||||
self,
|
||||
container: _ActionsContainer,
|
||||
title: str | None = None,
|
||||
description: str | None = None,
|
||||
*,
|
||||
argument_default: Any = ...,
|
||||
conflict_handler: str = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
@deprecated("Undocumented `prefix_chars` parameter is deprecated since Python 3.14.")
|
||||
def __init__(
|
||||
self,
|
||||
container: _ActionsContainer,
|
||||
title: str | None = None,
|
||||
description: str | None = None,
|
||||
*,
|
||||
prefix_chars: str,
|
||||
argument_default: Any = ...,
|
||||
conflict_handler: str = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
container: _ActionsContainer,
|
||||
title: str | None = None,
|
||||
description: str | None = None,
|
||||
*,
|
||||
prefix_chars: str = ...,
|
||||
argument_default: Any = ...,
|
||||
conflict_handler: str = ...,
|
||||
) -> None: ...
|
||||
|
||||
# undocumented
|
||||
class _MutuallyExclusiveGroup(_ArgumentGroup):
|
||||
|
||||
Reference in New Issue
Block a user