mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-11 09:08:27 +08:00
Use lowercase tuple where possible (#6170)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user