Use lowercase tuple where possible (#6170)

This commit is contained in:
Akuli
2021-10-15 00:18:19 +00:00
committed by GitHub
parent 5f386b0575
commit 994b69ef8f
242 changed files with 1212 additions and 1224 deletions

View File

@@ -20,7 +20,7 @@ class ArgumentError(Exception):
# undocumented
class _AttributeHolder:
def _get_kwargs(self) -> list[Tuple[str, Any]]: ...
def _get_kwargs(self) -> list[tuple[str, Any]]: ...
def _get_args(self) -> list[Any]: ...
# undocumented
@@ -67,10 +67,10 @@ class _ActionsContainer:
def _get_positional_kwargs(self, dest: str, **kwargs: Any) -> dict[str, Any]: ...
def _get_optional_kwargs(self, *args: Any, **kwargs: Any) -> dict[str, Any]: ...
def _pop_action_class(self, kwargs: Any, default: Type[Action] | None = ...) -> Type[Action]: ...
def _get_handler(self) -> Callable[[Action, Iterable[Tuple[str, Action]]], Any]: ...
def _get_handler(self) -> Callable[[Action, Iterable[tuple[str, Action]]], Any]: ...
def _check_conflict(self, action: Action) -> None: ...
def _handle_conflict_error(self, action: Action, conflicting_actions: Iterable[Tuple[str, Action]]) -> NoReturn: ...
def _handle_conflict_resolve(self, action: Action, conflicting_actions: Iterable[Tuple[str, Action]]) -> None: ...
def _handle_conflict_error(self, action: Action, conflicting_actions: Iterable[tuple[str, Action]]) -> NoReturn: ...
def _handle_conflict_resolve(self, action: Action, conflicting_actions: Iterable[tuple[str, Action]]) -> None: ...
class _FormatterClass(Protocol):
def __call__(self, prog: str) -> HelpFormatter: ...
@@ -169,7 +169,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
def format_help(self) -> str: ...
def parse_known_args(
self, args: Sequence[str] | None = ..., namespace: Namespace | None = ...
) -> Tuple[Namespace, list[str]]: ...
) -> tuple[Namespace, list[str]]: ...
def convert_arg_line_to_args(self, arg_line: str) -> list[str]: ...
def exit(self, status: int = ..., message: str | None = ...) -> NoReturn: ...
def error(self, message: str) -> NoReturn: ...
@@ -177,16 +177,16 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
def parse_intermixed_args(self, args: Sequence[str] | None = ..., namespace: Namespace | None = ...) -> Namespace: ...
def parse_known_intermixed_args(
self, args: Sequence[str] | None = ..., namespace: Namespace | None = ...
) -> Tuple[Namespace, list[str]]: ...
) -> tuple[Namespace, list[str]]: ...
# undocumented
def _get_optional_actions(self) -> list[Action]: ...
def _get_positional_actions(self) -> list[Action]: ...
def _parse_known_args(self, arg_strings: list[str], namespace: Namespace) -> Tuple[Namespace, list[str]]: ...
def _parse_known_args(self, arg_strings: list[str], namespace: Namespace) -> tuple[Namespace, list[str]]: ...
def _read_args_from_files(self, arg_strings: list[str]) -> list[str]: ...
def _match_argument(self, action: Action, arg_strings_pattern: str) -> int: ...
def _match_arguments_partial(self, actions: Sequence[Action], arg_strings_pattern: str) -> list[int]: ...
def _parse_optional(self, arg_string: str) -> Tuple[Action | None, str, str | None] | None: ...
def _get_option_tuples(self, option_string: str) -> list[Tuple[Action, str, str | None]]: ...
def _parse_optional(self, arg_string: str) -> tuple[Action | None, str, str | None] | None: ...
def _get_option_tuples(self, option_string: str) -> list[tuple[Action, str, str | None]]: ...
def _get_nargs_pattern(self, action: Action) -> str: ...
def _get_values(self, action: Action, arg_strings: list[str]) -> Any: ...
def _get_value(self, action: Action, arg_string: str) -> Any: ...