yaml: allow ReadableBuffer in represent_binary (#9701)

This commit is contained in:
Jelle Zijlstra
2023-02-09 07:03:49 -08:00
committed by GitHub
parent ad1e2bede1
commit e17ee201f5

View File

@@ -1,5 +1,5 @@
import datetime
from _typeshed import Incomplete, SupportsItems
from _typeshed import Incomplete, ReadableBuffer, SupportsItems
from collections.abc import Callable, Iterable, Mapping
from types import BuiltinFunctionType, FunctionType, ModuleType
from typing import Any, ClassVar, NoReturn, TypeVar
@@ -40,7 +40,7 @@ class SafeRepresenter(BaseRepresenter):
def ignore_aliases(self, data) -> bool: ...
def represent_none(self, data) -> ScalarNode: ...
def represent_str(self, data: str) -> ScalarNode: ...
def represent_binary(self, data: bytes) -> ScalarNode: ...
def represent_binary(self, data: ReadableBuffer) -> ScalarNode: ...
def represent_bool(self, data: bool) -> ScalarNode: ...
def represent_int(self, data: int) -> ScalarNode: ...
def represent_float(self, data: float) -> ScalarNode: ...