argparse#add_argument: make choices optional (#5574)

This commit is contained in:
谭九鼎
2021-06-04 16:20:22 +08:00
committed by GitHub
parent a4075472d3
commit 10889422df

View File

@@ -69,7 +69,7 @@ class _ActionsContainer:
const: Any = ...,
default: Any = ...,
type: Union[Callable[[str], _T], Callable[[str], _T], FileType] = ...,
choices: Iterable[_T] = ...,
choices: Optional[Iterable[_T]] = ...,
required: bool = ...,
help: Optional[str] = ...,
metavar: Optional[Union[str, Tuple[str, ...]]] = ...,