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
+3 -3
View File
@@ -2,7 +2,7 @@ import datetime
import sys
from _typeshed import SupportsItems
from types import BuiltinFunctionType, FunctionType, ModuleType
from typing import Any, Callable, ClassVar, Iterable, Mapping, NoReturn, Tuple, Type, TypeVar
from typing import Any, Callable, ClassVar, Iterable, Mapping, NoReturn, Type, TypeVar
from yaml.error import YAMLError as YAMLError
from yaml.nodes import MappingNode as MappingNode, Node as Node, ScalarNode as ScalarNode, SequenceNode as SequenceNode
@@ -33,7 +33,7 @@ class BaseRepresenter:
def represent_scalar(self, tag: str, value, style: str | None = ...) -> ScalarNode: ...
def represent_sequence(self, tag: str, sequence: Iterable[Any], flow_style: bool | None = ...) -> SequenceNode: ...
def represent_mapping(
self, tag: str, mapping: SupportsItems[Any, Any] | Iterable[Tuple[Any, Any]], flow_style: bool | None = ...
self, tag: str, mapping: SupportsItems[Any, Any] | Iterable[tuple[Any, Any]], flow_style: bool | None = ...
) -> MappingNode: ...
def ignore_aliases(self, data) -> bool: ...
@@ -50,7 +50,7 @@ class SafeRepresenter(BaseRepresenter):
def represent_int(self, data: int) -> ScalarNode: ...
def represent_float(self, data: float) -> ScalarNode: ...
def represent_list(self, data: Iterable[Any]) -> SequenceNode: ...
def represent_dict(self, data: SupportsItems[Any, Any] | Iterable[Tuple[Any, Any]]) -> MappingNode: ...
def represent_dict(self, data: SupportsItems[Any, Any] | Iterable[tuple[Any, Any]]) -> MappingNode: ...
def represent_set(self, data: Iterable[Any]) -> MappingNode: ...
def represent_date(self, data: datetime.date) -> ScalarNode: ...
def represent_datetime(self, data: datetime.datetime) -> ScalarNode: ...