mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-18 06:19:47 +08:00
Add default values for third-party stubs beginning with 'P' (#9957)
This commit is contained in:
@@ -30,7 +30,7 @@ _Representer = TypeVar("_Representer", bound=BaseRepresenter)
|
||||
__with_libyaml__: bool
|
||||
__version__: str
|
||||
|
||||
def warnings(settings=...): ...
|
||||
def warnings(settings=None): ...
|
||||
def scan(stream, Loader: type[_Loader | _CLoader] = ...): ...
|
||||
def parse(stream, Loader: type[_Loader | _CLoader] = ...): ...
|
||||
def compose(stream, Loader: type[_Loader | _CLoader] = ...): ...
|
||||
@@ -45,45 +45,45 @@ def unsafe_load(stream: _ReadStream) -> Any: ...
|
||||
def unsafe_load_all(stream: _ReadStream) -> Iterator[Any]: ...
|
||||
def emit(
|
||||
events,
|
||||
stream: _WriteStream[Any] | None = ...,
|
||||
stream: _WriteStream[Any] | None = None,
|
||||
Dumper=...,
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | _Inf | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | _Inf | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
): ...
|
||||
@overload
|
||||
def serialize_all(
|
||||
nodes,
|
||||
stream: _WriteStream[Any],
|
||||
Dumper=...,
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | _Inf | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: bool | None = ...,
|
||||
explicit_end: bool | None = ...,
|
||||
version: tuple[int, int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | _Inf | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: bool | None = None,
|
||||
explicit_end: bool | None = None,
|
||||
version: tuple[int, int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def serialize_all(
|
||||
nodes,
|
||||
stream: None = ...,
|
||||
stream: None = None,
|
||||
Dumper=...,
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | _Inf | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: bool | None = ...,
|
||||
explicit_end: bool | None = ...,
|
||||
version: tuple[int, int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | _Inf | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: bool | None = None,
|
||||
explicit_end: bool | None = None,
|
||||
version: tuple[int, int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
) -> _Yaml: ...
|
||||
@overload
|
||||
def serialize(
|
||||
@@ -105,7 +105,7 @@ def serialize(
|
||||
@overload
|
||||
def serialize(
|
||||
node,
|
||||
stream: None = ...,
|
||||
stream: None = None,
|
||||
Dumper=...,
|
||||
*,
|
||||
canonical: bool | None = ...,
|
||||
@@ -124,38 +124,38 @@ def dump_all(
|
||||
documents: Iterable[Any],
|
||||
stream: _WriteStream[Any],
|
||||
Dumper=...,
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool | None = ...,
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | _Inf | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: bool | None = ...,
|
||||
explicit_end: bool | None = ...,
|
||||
version: tuple[int, int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
default_style: str | None = None,
|
||||
default_flow_style: bool | None = False,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | _Inf | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: bool | None = None,
|
||||
explicit_end: bool | None = None,
|
||||
version: tuple[int, int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
sort_keys: bool = True,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def dump_all(
|
||||
documents: Iterable[Any],
|
||||
stream: None = ...,
|
||||
stream: None = None,
|
||||
Dumper=...,
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool | None = ...,
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | _Inf | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: bool | None = ...,
|
||||
explicit_end: bool | None = ...,
|
||||
version: tuple[int, int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
default_style: str | None = None,
|
||||
default_flow_style: bool | None = False,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | _Inf | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: bool | None = None,
|
||||
explicit_end: bool | None = None,
|
||||
version: tuple[int, int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
sort_keys: bool = True,
|
||||
) -> _Yaml: ...
|
||||
@overload
|
||||
def dump(
|
||||
@@ -180,7 +180,7 @@ def dump(
|
||||
@overload
|
||||
def dump(
|
||||
data: Any,
|
||||
stream: None = ...,
|
||||
stream: None = None,
|
||||
Dumper=...,
|
||||
*,
|
||||
default_style: str | None = ...,
|
||||
@@ -219,7 +219,7 @@ def safe_dump_all(
|
||||
@overload
|
||||
def safe_dump_all(
|
||||
documents: Iterable[Any],
|
||||
stream: None = ...,
|
||||
stream: None = None,
|
||||
*,
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool | None = ...,
|
||||
@@ -257,7 +257,7 @@ def safe_dump(
|
||||
@overload
|
||||
def safe_dump(
|
||||
data: Any,
|
||||
stream: None = ...,
|
||||
stream: None = None,
|
||||
*,
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool | None = ...,
|
||||
@@ -276,26 +276,26 @@ def safe_dump(
|
||||
def add_implicit_resolver(
|
||||
tag: str,
|
||||
regexp: Pattern[str],
|
||||
first: Iterable[Any] | None = ...,
|
||||
Loader: type[BaseResolver] | None = ...,
|
||||
first: Iterable[Any] | None = None,
|
||||
Loader: type[BaseResolver] | None = None,
|
||||
Dumper: type[BaseResolver] = ...,
|
||||
) -> None: ...
|
||||
def add_path_resolver(
|
||||
tag: str,
|
||||
path: Iterable[Any],
|
||||
kind: type[Any] | None = ...,
|
||||
Loader: type[BaseResolver] | None = ...,
|
||||
kind: type[Any] | None = None,
|
||||
Loader: type[BaseResolver] | None = None,
|
||||
Dumper: type[BaseResolver] = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def add_constructor(
|
||||
tag: str, constructor: Callable[[Loader | FullLoader | UnsafeLoader, Node], Any], Loader: None = ...
|
||||
tag: str, constructor: Callable[[Loader | FullLoader | UnsafeLoader, Node], Any], Loader: None = None
|
||||
) -> None: ...
|
||||
@overload
|
||||
def add_constructor(tag: str, constructor: Callable[[_Constructor, Node], Any], Loader: type[_Constructor]) -> None: ...
|
||||
@overload
|
||||
def add_multi_constructor(
|
||||
tag_prefix: str, multi_constructor: Callable[[Loader | FullLoader | UnsafeLoader, str, Node], Any], Loader: None = ...
|
||||
tag_prefix: str, multi_constructor: Callable[[Loader | FullLoader | UnsafeLoader, str, Node], Any], Loader: None = None
|
||||
) -> None: ...
|
||||
@overload
|
||||
def add_multi_constructor(
|
||||
|
||||
@@ -30,11 +30,11 @@ class BaseConstructor:
|
||||
def get_data(self): ...
|
||||
def get_single_data(self) -> Any: ...
|
||||
def construct_document(self, node): ...
|
||||
def construct_object(self, node, deep=...): ...
|
||||
def construct_object(self, node, deep=False): ...
|
||||
def construct_scalar(self, node: ScalarNode) -> _Scalar: ...
|
||||
def construct_sequence(self, node: SequenceNode, deep: bool = ...) -> list[Any]: ...
|
||||
def construct_mapping(self, node: MappingNode, deep: bool = ...) -> dict[Hashable, Any]: ...
|
||||
def construct_pairs(self, node, deep=...): ...
|
||||
def construct_sequence(self, node: SequenceNode, deep: bool = False) -> list[Any]: ...
|
||||
def construct_mapping(self, node: MappingNode, deep: bool = False) -> dict[Hashable, Any]: ...
|
||||
def construct_pairs(self, node, deep=False): ...
|
||||
@classmethod
|
||||
# Use typevars so we can have covariant behaviour in the parameter types
|
||||
def add_constructor(cls, tag: str, constructor: Callable[[_L, _N], Any]) -> None: ...
|
||||
@@ -44,7 +44,7 @@ class BaseConstructor:
|
||||
class SafeConstructor(BaseConstructor):
|
||||
def construct_scalar(self, node: ScalarNode) -> _Scalar: ...
|
||||
def flatten_mapping(self, node: MappingNode) -> None: ...
|
||||
def construct_mapping(self, node: MappingNode, deep: bool = ...) -> dict[Hashable, Any]: ...
|
||||
def construct_mapping(self, node: MappingNode, deep: bool = False) -> dict[Hashable, Any]: ...
|
||||
def construct_yaml_null(self, node: ScalarNode) -> None: ...
|
||||
bool_values: ClassVar[dict[str, bool]]
|
||||
def construct_yaml_bool(self, node: ScalarNode) -> bool: ...
|
||||
@@ -73,20 +73,20 @@ class FullConstructor(SafeConstructor):
|
||||
def construct_python_long(self, node): ...
|
||||
def construct_python_complex(self, node): ...
|
||||
def construct_python_tuple(self, node): ...
|
||||
def find_python_module(self, name, mark, unsafe=...): ...
|
||||
def find_python_name(self, name, mark, unsafe=...): ...
|
||||
def find_python_module(self, name, mark, unsafe=False): ...
|
||||
def find_python_name(self, name, mark, unsafe=False): ...
|
||||
def construct_python_name(self, suffix, node): ...
|
||||
def construct_python_module(self, suffix, node): ...
|
||||
def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=..., unsafe=...): ...
|
||||
def set_python_instance_state(self, instance, state, unsafe: bool = ...) -> None: ...
|
||||
def make_python_instance(self, suffix, node, args=None, kwds=None, newobj=False, unsafe=False): ...
|
||||
def set_python_instance_state(self, instance, state, unsafe: bool = False) -> None: ...
|
||||
def construct_python_object(self, suffix, node): ...
|
||||
def construct_python_object_apply(self, suffix, node, newobj=...): ...
|
||||
def construct_python_object_apply(self, suffix, node, newobj=False): ...
|
||||
def construct_python_object_new(self, suffix, node): ...
|
||||
|
||||
class UnsafeConstructor(FullConstructor):
|
||||
def find_python_module(self, name, mark): ...
|
||||
def find_python_name(self, name, mark): ...
|
||||
def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=...): ...
|
||||
def make_python_instance(self, suffix, node, args=None, kwds=None, newobj=False): ...
|
||||
def set_python_instance_state(self, instance, state): ...
|
||||
|
||||
class Constructor(SafeConstructor):
|
||||
@@ -99,8 +99,8 @@ class Constructor(SafeConstructor):
|
||||
def find_python_name(self, name, mark): ...
|
||||
def construct_python_name(self, suffix, node): ...
|
||||
def construct_python_module(self, suffix, node): ...
|
||||
def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=...): ...
|
||||
def make_python_instance(self, suffix, node, args=None, kwds=None, newobj=False): ...
|
||||
def set_python_instance_state(self, instance, state): ...
|
||||
def construct_python_object(self, suffix, node): ...
|
||||
def construct_python_object_apply(self, suffix, node, newobj=...): ...
|
||||
def construct_python_object_apply(self, suffix, node, newobj=False): ...
|
||||
def construct_python_object_new(self, suffix, node): ...
|
||||
|
||||
+26
-26
@@ -32,38 +32,38 @@ class CBaseDumper(CEmitter, BaseRepresenter, BaseResolver):
|
||||
def __init__(
|
||||
self,
|
||||
stream: IO[Any],
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool | None = ...,
|
||||
canonical: Incomplete | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | None = ...,
|
||||
allow_unicode: Incomplete | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: Incomplete | None = ...,
|
||||
explicit_end: Incomplete | None = ...,
|
||||
version: Sequence[int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
default_style: str | None = None,
|
||||
default_flow_style: bool | None = False,
|
||||
canonical: Incomplete | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | None = None,
|
||||
allow_unicode: Incomplete | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: Incomplete | None = None,
|
||||
explicit_end: Incomplete | None = None,
|
||||
version: Sequence[int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
sort_keys: bool = True,
|
||||
) -> None: ...
|
||||
|
||||
class CDumper(CEmitter, SafeRepresenter, Resolver):
|
||||
def __init__(
|
||||
self,
|
||||
stream: IO[Any],
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool = ...,
|
||||
canonical: Incomplete | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | None = ...,
|
||||
allow_unicode: Incomplete | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: Incomplete | None = ...,
|
||||
explicit_end: Incomplete | None = ...,
|
||||
version: Sequence[int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
default_style: str | None = None,
|
||||
default_flow_style: bool = False,
|
||||
canonical: Incomplete | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | None = None,
|
||||
allow_unicode: Incomplete | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: Incomplete | None = None,
|
||||
explicit_end: Incomplete | None = None,
|
||||
version: Sequence[int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
sort_keys: bool = True,
|
||||
) -> None: ...
|
||||
|
||||
CSafeDumper = CDumper
|
||||
|
||||
@@ -17,55 +17,55 @@ class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver):
|
||||
def __init__(
|
||||
self,
|
||||
stream: _WriteStream[Any],
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool | None = ...,
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | _Inf | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: bool | None = ...,
|
||||
explicit_end: bool | None = ...,
|
||||
version: tuple[int, int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
default_style: str | None = None,
|
||||
default_flow_style: bool | None = False,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | _Inf | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: bool | None = None,
|
||||
explicit_end: bool | None = None,
|
||||
version: tuple[int, int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
sort_keys: bool = True,
|
||||
) -> None: ...
|
||||
|
||||
class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver):
|
||||
def __init__(
|
||||
self,
|
||||
stream: _WriteStream[Any],
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool | None = ...,
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | _Inf | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: bool | None = ...,
|
||||
explicit_end: bool | None = ...,
|
||||
version: tuple[int, int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
default_style: str | None = None,
|
||||
default_flow_style: bool | None = False,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | _Inf | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: bool | None = None,
|
||||
explicit_end: bool | None = None,
|
||||
version: tuple[int, int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
sort_keys: bool = True,
|
||||
) -> None: ...
|
||||
|
||||
class Dumper(Emitter, Serializer, Representer, Resolver):
|
||||
def __init__(
|
||||
self,
|
||||
stream: _WriteStream[Any],
|
||||
default_style: str | None = ...,
|
||||
default_flow_style: bool | None = ...,
|
||||
canonical: bool | None = ...,
|
||||
indent: int | None = ...,
|
||||
width: int | _Inf | None = ...,
|
||||
allow_unicode: bool | None = ...,
|
||||
line_break: str | None = ...,
|
||||
encoding: str | None = ...,
|
||||
explicit_start: bool | None = ...,
|
||||
explicit_end: bool | None = ...,
|
||||
version: tuple[int, int] | None = ...,
|
||||
tags: Mapping[str, str] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
default_style: str | None = None,
|
||||
default_flow_style: bool | None = False,
|
||||
canonical: bool | None = None,
|
||||
indent: int | None = None,
|
||||
width: int | _Inf | None = None,
|
||||
allow_unicode: bool | None = None,
|
||||
line_break: str | None = None,
|
||||
encoding: str | None = None,
|
||||
explicit_start: bool | None = None,
|
||||
explicit_end: bool | None = None,
|
||||
version: tuple[int, int] | None = None,
|
||||
tags: Mapping[str, str] | None = None,
|
||||
sort_keys: bool = True,
|
||||
) -> None: ...
|
||||
|
||||
@@ -56,20 +56,20 @@ class Emitter:
|
||||
analysis: Any
|
||||
style: Any
|
||||
def __init__(
|
||||
self, stream: _WriteStream[Any], canonical=..., indent=..., width=..., allow_unicode=..., line_break=...
|
||||
self, stream: _WriteStream[Any], canonical=None, indent=None, width=None, allow_unicode=None, line_break=None
|
||||
) -> None: ...
|
||||
def dispose(self): ...
|
||||
def emit(self, event): ...
|
||||
def need_more_events(self): ...
|
||||
def need_events(self, count): ...
|
||||
def increase_indent(self, flow=..., indentless=...): ...
|
||||
def increase_indent(self, flow=False, indentless=False): ...
|
||||
def expect_stream_start(self): ...
|
||||
def expect_nothing(self): ...
|
||||
def expect_first_document_start(self): ...
|
||||
def expect_document_start(self, first=...): ...
|
||||
def expect_document_start(self, first=False): ...
|
||||
def expect_document_end(self): ...
|
||||
def expect_document_root(self): ...
|
||||
def expect_node(self, root=..., sequence=..., mapping=..., simple_key=...): ...
|
||||
def expect_node(self, root=False, sequence=False, mapping=False, simple_key=False): ...
|
||||
def expect_alias(self): ...
|
||||
def expect_scalar(self): ...
|
||||
def expect_flow_sequence(self): ...
|
||||
@@ -82,10 +82,10 @@ class Emitter:
|
||||
def expect_flow_mapping_value(self): ...
|
||||
def expect_block_sequence(self): ...
|
||||
def expect_first_block_sequence_item(self): ...
|
||||
def expect_block_sequence_item(self, first=...): ...
|
||||
def expect_block_sequence_item(self, first=False): ...
|
||||
def expect_block_mapping(self): ...
|
||||
def expect_first_block_mapping_key(self): ...
|
||||
def expect_block_mapping_key(self, first=...): ...
|
||||
def expect_block_mapping_key(self, first=False): ...
|
||||
def expect_block_mapping_simple_value(self): ...
|
||||
def expect_block_mapping_value(self): ...
|
||||
def check_empty_sequence(self): ...
|
||||
@@ -105,15 +105,15 @@ class Emitter:
|
||||
def flush_stream(self): ...
|
||||
def write_stream_start(self): ...
|
||||
def write_stream_end(self): ...
|
||||
def write_indicator(self, indicator, need_whitespace, whitespace=..., indention=...): ...
|
||||
def write_indicator(self, indicator, need_whitespace, whitespace=False, indention=False): ...
|
||||
def write_indent(self): ...
|
||||
def write_line_break(self, data=...): ...
|
||||
def write_line_break(self, data=None): ...
|
||||
def write_version_directive(self, version_text): ...
|
||||
def write_tag_directive(self, handle_text, prefix_text): ...
|
||||
def write_single_quoted(self, text, split=...): ...
|
||||
def write_single_quoted(self, text, split=True): ...
|
||||
ESCAPE_REPLACEMENTS: Any
|
||||
def write_double_quoted(self, text, split=...): ...
|
||||
def write_double_quoted(self, text, split=True): ...
|
||||
def determine_block_hints(self, text): ...
|
||||
def write_folded(self, text): ...
|
||||
def write_literal(self, text): ...
|
||||
def write_plain(self, text, split=...): ...
|
||||
def write_plain(self, text, split=True): ...
|
||||
|
||||
@@ -6,7 +6,7 @@ class Mark:
|
||||
buffer: str | None
|
||||
pointer: int
|
||||
def __init__(self, name: str, index: int, line: int, column: int, buffer: str | None, pointer: int) -> None: ...
|
||||
def get_snippet(self, indent: int = ..., max_length: int = ...) -> str | None: ...
|
||||
def get_snippet(self, indent: int = 4, max_length: int = 75) -> str | None: ...
|
||||
|
||||
class YAMLError(Exception): ...
|
||||
|
||||
@@ -18,9 +18,9 @@ class MarkedYAMLError(YAMLError):
|
||||
note: str | None
|
||||
def __init__(
|
||||
self,
|
||||
context: str | None = ...,
|
||||
context_mark: Mark | None = ...,
|
||||
problem: str | None = ...,
|
||||
problem_mark: Mark | None = ...,
|
||||
note: str | None = ...,
|
||||
context: str | None = None,
|
||||
context_mark: Mark | None = None,
|
||||
problem: str | None = None,
|
||||
problem_mark: Mark | None = None,
|
||||
note: str | None = None,
|
||||
) -> None: ...
|
||||
|
||||
@@ -3,13 +3,13 @@ from typing import Any
|
||||
class Event:
|
||||
start_mark: Any
|
||||
end_mark: Any
|
||||
def __init__(self, start_mark=..., end_mark=...) -> None: ...
|
||||
def __init__(self, start_mark=None, end_mark=None) -> None: ...
|
||||
|
||||
class NodeEvent(Event):
|
||||
anchor: Any
|
||||
start_mark: Any
|
||||
end_mark: Any
|
||||
def __init__(self, anchor, start_mark=..., end_mark=...) -> None: ...
|
||||
def __init__(self, anchor, start_mark=None, end_mark=None) -> None: ...
|
||||
|
||||
class CollectionStartEvent(NodeEvent):
|
||||
anchor: Any
|
||||
@@ -18,7 +18,7 @@ class CollectionStartEvent(NodeEvent):
|
||||
start_mark: Any
|
||||
end_mark: Any
|
||||
flow_style: Any
|
||||
def __init__(self, anchor, tag, implicit, start_mark=..., end_mark=..., flow_style=...) -> None: ...
|
||||
def __init__(self, anchor, tag, implicit, start_mark=None, end_mark=None, flow_style=None) -> None: ...
|
||||
|
||||
class CollectionEndEvent(Event): ...
|
||||
|
||||
@@ -26,7 +26,7 @@ class StreamStartEvent(Event):
|
||||
start_mark: Any
|
||||
end_mark: Any
|
||||
encoding: Any
|
||||
def __init__(self, start_mark=..., end_mark=..., encoding=...) -> None: ...
|
||||
def __init__(self, start_mark=None, end_mark=None, encoding=None) -> None: ...
|
||||
|
||||
class StreamEndEvent(Event): ...
|
||||
|
||||
@@ -36,13 +36,13 @@ class DocumentStartEvent(Event):
|
||||
explicit: Any
|
||||
version: Any
|
||||
tags: Any
|
||||
def __init__(self, start_mark=..., end_mark=..., explicit=..., version=..., tags=...) -> None: ...
|
||||
def __init__(self, start_mark=None, end_mark=None, explicit=None, version=None, tags=None) -> None: ...
|
||||
|
||||
class DocumentEndEvent(Event):
|
||||
start_mark: Any
|
||||
end_mark: Any
|
||||
explicit: Any
|
||||
def __init__(self, start_mark=..., end_mark=..., explicit=...) -> None: ...
|
||||
def __init__(self, start_mark=None, end_mark=None, explicit=None) -> None: ...
|
||||
|
||||
class AliasEvent(NodeEvent): ...
|
||||
|
||||
@@ -54,7 +54,7 @@ class ScalarEvent(NodeEvent):
|
||||
start_mark: Any
|
||||
end_mark: Any
|
||||
style: Any
|
||||
def __init__(self, anchor, tag, implicit, value, start_mark=..., end_mark=..., style=...) -> None: ...
|
||||
def __init__(self, anchor, tag, implicit, value, start_mark=None, end_mark=None, style=None) -> None: ...
|
||||
|
||||
class SequenceStartEvent(CollectionStartEvent): ...
|
||||
class SequenceEndEvent(CollectionEndEvent): ...
|
||||
|
||||
@@ -16,13 +16,13 @@ class ScalarNode(Node):
|
||||
id: ClassVar[str]
|
||||
style: str | Any
|
||||
def __init__(
|
||||
self, tag: str, value, start_mark: Mark | None = ..., end_mark: Mark | None = ..., style: str | None = ...
|
||||
self, tag: str, value, start_mark: Mark | None = None, end_mark: Mark | None = None, style: str | None = None
|
||||
) -> None: ...
|
||||
|
||||
class CollectionNode(Node):
|
||||
flow_style: bool | Any
|
||||
def __init__(
|
||||
self, tag: str, value, start_mark: Mark | None = ..., end_mark: Mark | None = ..., flow_style: bool | None = ...
|
||||
self, tag: str, value, start_mark: Mark | None = None, end_mark: Mark | None = None, flow_style: bool | None = None
|
||||
) -> None: ...
|
||||
|
||||
class SequenceNode(CollectionNode):
|
||||
|
||||
@@ -26,7 +26,7 @@ class Parser:
|
||||
def parse_block_node(self): ...
|
||||
def parse_flow_node(self): ...
|
||||
def parse_block_node_or_indentless_sequence(self): ...
|
||||
def parse_node(self, block=..., indentless_sequence=...): ...
|
||||
def parse_node(self, block=False, indentless_sequence=False): ...
|
||||
def parse_block_sequence_first_entry(self): ...
|
||||
def parse_block_sequence_entry(self): ...
|
||||
def parse_indentless_sequence_entry(self): ...
|
||||
@@ -34,12 +34,12 @@ class Parser:
|
||||
def parse_block_mapping_key(self): ...
|
||||
def parse_block_mapping_value(self): ...
|
||||
def parse_flow_sequence_first_entry(self): ...
|
||||
def parse_flow_sequence_entry(self, first=...): ...
|
||||
def parse_flow_sequence_entry(self, first=False): ...
|
||||
def parse_flow_sequence_entry_mapping_key(self): ...
|
||||
def parse_flow_sequence_entry_mapping_value(self): ...
|
||||
def parse_flow_sequence_entry_mapping_end(self): ...
|
||||
def parse_flow_mapping_first_key(self): ...
|
||||
def parse_flow_mapping_key(self, first=...): ...
|
||||
def parse_flow_mapping_key(self, first=False): ...
|
||||
def parse_flow_mapping_value(self): ...
|
||||
def parse_flow_mapping_empty_value(self): ...
|
||||
def process_empty_scalar(self, mark): ...
|
||||
|
||||
@@ -28,12 +28,12 @@ class Reader:
|
||||
line: Any
|
||||
column: Any
|
||||
def __init__(self, stream: _ReadStream) -> None: ...
|
||||
def peek(self, index=...): ...
|
||||
def prefix(self, length=...): ...
|
||||
def forward(self, length=...): ...
|
||||
def peek(self, index=0): ...
|
||||
def prefix(self, length=1): ...
|
||||
def forward(self, length=1): ...
|
||||
def get_mark(self): ...
|
||||
def determine_encoding(self): ...
|
||||
NON_PRINTABLE: Any
|
||||
def check_printable(self, data): ...
|
||||
def update(self, length): ...
|
||||
def update_raw(self, size=...): ...
|
||||
def update_raw(self, size=4096): ...
|
||||
|
||||
@@ -21,17 +21,17 @@ class BaseRepresenter:
|
||||
represented_objects: dict[int, Node]
|
||||
object_keeper: list[Any]
|
||||
alias_key: int | Incomplete
|
||||
def __init__(self, default_style: str | None = ..., default_flow_style: bool = ..., sort_keys: bool = ...) -> None: ...
|
||||
def __init__(self, default_style: str | None = None, default_flow_style: bool = False, sort_keys: bool = True) -> None: ...
|
||||
def represent(self, data) -> None: ...
|
||||
def represent_data(self, data) -> Node: ...
|
||||
@classmethod
|
||||
def add_representer(cls: type[_R], data_type: type[_T], representer: Callable[[_R, _T], Node]) -> None: ...
|
||||
@classmethod
|
||||
def add_multi_representer(cls: type[_R], data_type: type[_T], representer: Callable[[_R, _T], Node]) -> None: ...
|
||||
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_scalar(self, tag: str, value, style: str | None = None) -> ScalarNode: ...
|
||||
def represent_sequence(self, tag: str, sequence: Iterable[Any], flow_style: bool | None = 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 = None
|
||||
) -> MappingNode: ...
|
||||
def ignore_aliases(self, data) -> bool: ...
|
||||
|
||||
@@ -49,7 +49,7 @@ class SafeRepresenter(BaseRepresenter):
|
||||
def represent_set(self, data: Iterable[Any]) -> MappingNode: ...
|
||||
def represent_date(self, data: datetime.date) -> ScalarNode: ...
|
||||
def represent_datetime(self, data: datetime.datetime) -> ScalarNode: ...
|
||||
def represent_yaml_object(self, tag: str, data, cls, flow_style: bool | None = ...) -> MappingNode: ...
|
||||
def represent_yaml_object(self, tag: str, data, cls, flow_style: bool | None = None) -> MappingNode: ...
|
||||
def represent_undefined(self, data) -> NoReturn: ...
|
||||
|
||||
class Representer(SafeRepresenter):
|
||||
|
||||
@@ -16,7 +16,7 @@ class BaseResolver:
|
||||
@classmethod
|
||||
def add_implicit_resolver(cls, tag, regexp, first): ...
|
||||
@classmethod
|
||||
def add_path_resolver(cls, tag, path, kind=...): ...
|
||||
def add_path_resolver(cls, tag, path, kind=None): ...
|
||||
def descend_resolver(self, current_node, current_index): ...
|
||||
def ascend_resolver(self): ...
|
||||
def check_resolver_prefix(self, depth, path, kind, current_node, current_index): ...
|
||||
|
||||
@@ -16,7 +16,7 @@ class Serializer:
|
||||
anchors: Any
|
||||
last_anchor_id: Any
|
||||
closed: Any
|
||||
def __init__(self, encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> None: ...
|
||||
def __init__(self, encoding=None, explicit_start=None, explicit_end=None, version=None, tags=None) -> None: ...
|
||||
def open(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def serialize(self, node: Node) -> None: ...
|
||||
|
||||
@@ -24,7 +24,7 @@ class StreamStartToken(Token):
|
||||
start_mark: Any
|
||||
end_mark: Any
|
||||
encoding: Any
|
||||
def __init__(self, start_mark=..., end_mark=..., encoding=...) -> None: ...
|
||||
def __init__(self, start_mark=None, end_mark=None, encoding=None) -> None: ...
|
||||
|
||||
class StreamEndToken(Token):
|
||||
id: Any
|
||||
@@ -90,4 +90,4 @@ class ScalarToken(Token):
|
||||
start_mark: Any
|
||||
end_mark: Any
|
||||
style: Any
|
||||
def __init__(self, value, plain, start_mark, end_mark, style=...) -> None: ...
|
||||
def __init__(self, value, plain, start_mark, end_mark, style=None) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user