Re-organize directory structure (#4971)

See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
Ivan Levkivskyi
2021-01-27 12:00:39 +00:00
committed by GitHub
parent 869238e587
commit 16ae4c6120
1399 changed files with 601 additions and 97 deletions

View File

@@ -0,0 +1,2 @@
version = "0.1"
python2 = true

View File

@@ -0,0 +1,275 @@
import sys
from typing import IO, Any, Callable, Iterator, Optional, Sequence, Text, Union, overload
from yaml.dumper import * # noqa: F403
from yaml.error import * # noqa: F403
from yaml.events import * # noqa: F403
from yaml.loader import * # noqa: F403
from yaml.nodes import * # noqa: F403
from yaml.tokens import * # noqa: F403
from . import resolver as resolver # Help mypy a bit; this is implied by loader and dumper
from .cyaml import *
if sys.version_info < (3,):
_Str = Union[Text, str]
else:
_Str = str
# FIXME: the functions really return py2:unicode/py3:str if encoding is None, otherwise py2:str/py3:bytes. Waiting for python/mypy#5621
_Yaml = Any
__with_libyaml__: Any
__version__: str
def scan(stream, Loader=...): ...
def parse(stream, Loader=...): ...
def compose(stream, Loader=...): ...
def compose_all(stream, Loader=...): ...
def load(stream: Union[bytes, IO[bytes], Text, IO[Text]], Loader=...) -> Any: ...
def load_all(stream: Union[bytes, IO[bytes], Text, IO[Text]], Loader=...) -> Iterator[Any]: ...
def full_load(stream: Union[bytes, IO[bytes], Text, IO[Text]]) -> Any: ...
def full_load_all(stream: Union[bytes, IO[bytes], Text, IO[Text]]) -> Iterator[Any]: ...
def safe_load(stream: Union[bytes, IO[bytes], Text, IO[Text]]) -> Any: ...
def safe_load_all(stream: Union[bytes, IO[bytes], Text, IO[Text]]) -> Iterator[Any]: ...
def unsafe_load(stream: Union[bytes, IO[bytes], Text, IO[Text]]) -> Any: ...
def unsafe_load_all(stream: Union[bytes, IO[bytes], Text, IO[Text]]) -> Iterator[Any]: ...
def emit(events, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=...): ...
@overload
def serialize_all(
nodes,
stream: IO[str],
Dumper=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
) -> None: ...
@overload
def serialize_all(
nodes,
stream: None = ...,
Dumper=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding: Optional[_Str] = ...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
) -> _Yaml: ...
@overload
def serialize(
node,
stream: IO[str],
Dumper=...,
*,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
) -> None: ...
@overload
def serialize(
node,
stream: None = ...,
Dumper=...,
*,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding: Optional[_Str] = ...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
) -> _Yaml: ...
@overload
def dump_all(
documents: Sequence[Any],
stream: IO[str],
Dumper=...,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> None: ...
@overload
def dump_all(
documents: Sequence[Any],
stream: None = ...,
Dumper=...,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding: Optional[_Str] = ...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> _Yaml: ...
@overload
def dump(
data: Any,
stream: IO[str],
Dumper=...,
*,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> None: ...
@overload
def dump(
data: Any,
stream: None = ...,
Dumper=...,
*,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding: Optional[_Str] = ...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> _Yaml: ...
@overload
def safe_dump_all(
documents: Sequence[Any],
stream: IO[str],
*,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> None: ...
@overload
def safe_dump_all(
documents: Sequence[Any],
stream: None = ...,
*,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding: Optional[_Str] = ...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> _Yaml: ...
@overload
def safe_dump(
data: Any,
stream: IO[str],
*,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> None: ...
@overload
def safe_dump(
data: Any,
stream: None = ...,
*,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding: Optional[_Str] = ...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> _Yaml: ...
def add_implicit_resolver(tag, regexp, first=..., Loader=..., Dumper=...): ...
def add_path_resolver(tag, path, kind=..., Loader=..., Dumper=...): ...
def add_constructor(tag: _Str, constructor: Callable[[Loader, Node], Any], Loader: Loader = ...): ...
def add_multi_constructor(tag_prefix, multi_constructor, Loader=...): ...
def add_representer(data_type, representer, Dumper=...): ...
def add_multi_representer(data_type, multi_representer, Dumper=...): ...
class YAMLObjectMetaclass(type):
def __init__(self, name, bases, kwds) -> None: ...
class YAMLObject(metaclass=YAMLObjectMetaclass):
yaml_loader: Any
yaml_dumper: Any
yaml_tag: Any
yaml_flow_style: Any
@classmethod
def from_yaml(cls, loader, node): ...
@classmethod
def to_yaml(cls, dumper, data): ...

View File

@@ -0,0 +1,17 @@
from typing import Any
from yaml.error import MarkedYAMLError
class ComposerError(MarkedYAMLError): ...
class Composer:
anchors: Any
def __init__(self) -> None: ...
def check_node(self): ...
def get_node(self): ...
def get_single_node(self): ...
def compose_document(self): ...
def compose_node(self, parent, index): ...
def compose_scalar_node(self, anchor): ...
def compose_sequence_node(self, anchor): ...
def compose_mapping_node(self, anchor): ...

View File

@@ -0,0 +1,89 @@
import sys
from typing import Any, Text, Union
from yaml.error import MarkedYAMLError
from yaml.nodes import ScalarNode
_Scalar = Union[Text, int, float, bool, None]
class ConstructorError(MarkedYAMLError): ...
class BaseConstructor:
yaml_constructors: Any
yaml_multi_constructors: Any
constructed_objects: Any
recursive_objects: Any
state_generators: Any
deep_construct: Any
def __init__(self) -> None: ...
def check_data(self): ...
def get_data(self): ...
def get_single_data(self) -> Any: ...
def construct_document(self, node): ...
def construct_object(self, node, deep=...): ...
def construct_scalar(self, node: ScalarNode) -> _Scalar: ...
def construct_sequence(self, node, deep=...): ...
def construct_mapping(self, node, deep=...): ...
def construct_pairs(self, node, deep=...): ...
@classmethod
def add_constructor(cls, tag, constructor): ...
@classmethod
def add_multi_constructor(cls, tag_prefix, multi_constructor): ...
class SafeConstructor(BaseConstructor):
def construct_scalar(self, node: ScalarNode) -> _Scalar: ...
def flatten_mapping(self, node): ...
def construct_mapping(self, node, deep=...): ...
def construct_yaml_null(self, node): ...
bool_values: Any
def construct_yaml_bool(self, node): ...
def construct_yaml_int(self, node): ...
inf_value: Any
nan_value: Any
def construct_yaml_float(self, node): ...
def construct_yaml_binary(self, node): ...
timestamp_regexp: Any
def construct_yaml_timestamp(self, node): ...
def construct_yaml_omap(self, node): ...
def construct_yaml_pairs(self, node): ...
def construct_yaml_set(self, node): ...
def construct_yaml_str(self, node): ...
def construct_yaml_seq(self, node): ...
def construct_yaml_map(self, node): ...
def construct_yaml_object(self, node, cls): ...
def construct_undefined(self, node): ...
class FullConstructor(SafeConstructor):
def construct_python_str(self, node): ...
def construct_python_unicode(self, node): ...
def construct_python_bytes(self, node): ...
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 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): ...
def construct_python_object(self, suffix, node): ...
def construct_python_object_apply(self, suffix, node, newobj=...): ...
def construct_python_object_new(self, suffix, node): ...
class Constructor(SafeConstructor):
def construct_python_str(self, node): ...
def construct_python_unicode(self, node): ...
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): ...
def find_python_name(self, name, mark): ...
def construct_python_name(self, suffix, node): ...
def construct_python_module(self, suffix, node): ...
if sys.version_info < (3, 0):
class classobj: ...
def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=...): ...
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_new(self, suffix, node): ...

View File

@@ -0,0 +1,63 @@
from _typeshed import SupportsRead
from typing import IO, Any, Mapping, Optional, Sequence, Text, Union
from yaml.constructor import BaseConstructor, Constructor, SafeConstructor
from yaml.representer import BaseRepresenter, Representer, SafeRepresenter
from yaml.resolver import BaseResolver, Resolver
from yaml.serializer import Serializer
_Readable = SupportsRead[Union[Text, bytes]]
class CParser:
def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ...
class CBaseLoader(CParser, BaseConstructor, BaseResolver):
def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ...
class CLoader(CParser, SafeConstructor, Resolver):
def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ...
class CSafeLoader(CParser, SafeConstructor, Resolver):
def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ...
class CDangerLoader(CParser, Constructor, Resolver): ... # undocumented
class CEmitter(object):
def __init__(
self,
stream: IO[Any],
canonical: Optional[Any] = ...,
indent: Optional[int] = ...,
width: Optional[int] = ...,
allow_unicode: Optional[Any] = ...,
line_break: Optional[str] = ...,
encoding: Optional[Text] = ...,
explicit_start: Optional[Any] = ...,
explicit_end: Optional[Any] = ...,
version: Optional[Sequence[int]] = ...,
tags: Optional[Mapping[Text, Text]] = ...,
) -> None: ...
class CBaseDumper(CEmitter, BaseRepresenter, BaseResolver):
def __init__(
self,
stream: IO[Any],
default_style: Optional[str] = ...,
default_flow_style: Optional[bool] = ...,
canonical: Optional[Any] = ...,
indent: Optional[int] = ...,
width: Optional[int] = ...,
allow_unicode: Optional[Any] = ...,
line_break: Optional[str] = ...,
encoding: Optional[Text] = ...,
explicit_start: Optional[Any] = ...,
explicit_end: Optional[Any] = ...,
version: Optional[Sequence[int]] = ...,
tags: Optional[Mapping[Text, Text]] = ...,
) -> None: ...
class CDumper(CEmitter, SafeRepresenter, Resolver): ...
CSafeDumper = CDumper
class CDangerDumper(CEmitter, Serializer, Representer, Resolver): ... # undocumented

View File

@@ -0,0 +1,61 @@
from yaml.emitter import Emitter
from yaml.representer import BaseRepresenter, Representer, SafeRepresenter
from yaml.resolver import BaseResolver, Resolver
from yaml.serializer import Serializer
class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver):
def __init__(
self,
stream,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> None: ...
class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver):
def __init__(
self,
stream,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> None: ...
class Dumper(Emitter, Serializer, Representer, Resolver):
def __init__(
self,
stream,
default_style=...,
default_flow_style=...,
canonical=...,
indent=...,
width=...,
allow_unicode=...,
line_break=...,
encoding=...,
explicit_start=...,
explicit_end=...,
version=...,
tags=...,
sort_keys: bool = ...,
) -> None: ...

View File

@@ -0,0 +1,109 @@
from typing import Any
from yaml.error import YAMLError
class EmitterError(YAMLError): ...
class ScalarAnalysis:
scalar: Any
empty: Any
multiline: Any
allow_flow_plain: Any
allow_block_plain: Any
allow_single_quoted: Any
allow_double_quoted: Any
allow_block: Any
def __init__(
self, scalar, empty, multiline, allow_flow_plain, allow_block_plain, allow_single_quoted, allow_double_quoted, allow_block
) -> None: ...
class Emitter:
DEFAULT_TAG_PREFIXES: Any
stream: Any
encoding: Any
states: Any
state: Any
events: Any
event: Any
indents: Any
indent: Any
flow_level: Any
root_context: Any
sequence_context: Any
mapping_context: Any
simple_key_context: Any
line: Any
column: Any
whitespace: Any
indention: Any
open_ended: Any
canonical: Any
allow_unicode: Any
best_indent: Any
best_width: Any
best_line_break: Any
tag_prefixes: Any
prepared_anchor: Any
prepared_tag: Any
analysis: Any
style: Any
def __init__(self, stream, canonical=..., indent=..., width=..., allow_unicode=..., line_break=...) -> 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 expect_stream_start(self): ...
def expect_nothing(self): ...
def expect_first_document_start(self): ...
def expect_document_start(self, first=...): ...
def expect_document_end(self): ...
def expect_document_root(self): ...
def expect_node(self, root=..., sequence=..., mapping=..., simple_key=...): ...
def expect_alias(self): ...
def expect_scalar(self): ...
def expect_flow_sequence(self): ...
def expect_first_flow_sequence_item(self): ...
def expect_flow_sequence_item(self): ...
def expect_flow_mapping(self): ...
def expect_first_flow_mapping_key(self): ...
def expect_flow_mapping_key(self): ...
def expect_flow_mapping_simple_value(self): ...
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_mapping(self): ...
def expect_first_block_mapping_key(self): ...
def expect_block_mapping_key(self, first=...): ...
def expect_block_mapping_simple_value(self): ...
def expect_block_mapping_value(self): ...
def check_empty_sequence(self): ...
def check_empty_mapping(self): ...
def check_empty_document(self): ...
def check_simple_key(self): ...
def process_anchor(self, indicator): ...
def process_tag(self): ...
def choose_scalar_style(self): ...
def process_scalar(self): ...
def prepare_version(self, version): ...
def prepare_tag_handle(self, handle): ...
def prepare_tag_prefix(self, prefix): ...
def prepare_tag(self, tag): ...
def prepare_anchor(self, anchor): ...
def analyze_scalar(self, scalar): ...
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_indent(self): ...
def write_line_break(self, data=...): ...
def write_version_directive(self, version_text): ...
def write_tag_directive(self, handle_text, prefix_text): ...
def write_single_quoted(self, text, split=...): ...
ESCAPE_REPLACEMENTS: Any
def write_double_quoted(self, text, split=...): ...
def determine_block_hints(self, text): ...
def write_folded(self, text): ...
def write_literal(self, text): ...
def write_plain(self, text, split=...): ...

View File

@@ -0,0 +1,21 @@
from typing import Any
class Mark:
name: Any
index: Any
line: Any
column: Any
buffer: Any
pointer: Any
def __init__(self, name, index, line, column, buffer, pointer) -> None: ...
def get_snippet(self, indent=..., max_length=...): ...
class YAMLError(Exception): ...
class MarkedYAMLError(YAMLError):
context: Any
context_mark: Any
problem: Any
problem_mark: Any
note: Any
def __init__(self, context=..., context_mark=..., problem=..., problem_mark=..., note=...) -> None: ...

View File

@@ -0,0 +1,62 @@
from typing import Any
class Event:
start_mark: Any
end_mark: Any
def __init__(self, start_mark=..., end_mark=...) -> None: ...
class NodeEvent(Event):
anchor: Any
start_mark: Any
end_mark: Any
def __init__(self, anchor, start_mark=..., end_mark=...) -> None: ...
class CollectionStartEvent(NodeEvent):
anchor: Any
tag: Any
implicit: Any
start_mark: Any
end_mark: Any
flow_style: Any
def __init__(self, anchor, tag, implicit, start_mark=..., end_mark=..., flow_style=...) -> None: ...
class CollectionEndEvent(Event): ...
class StreamStartEvent(Event):
start_mark: Any
end_mark: Any
encoding: Any
def __init__(self, start_mark=..., end_mark=..., encoding=...) -> None: ...
class StreamEndEvent(Event): ...
class DocumentStartEvent(Event):
start_mark: Any
end_mark: Any
explicit: Any
version: Any
tags: Any
def __init__(self, start_mark=..., end_mark=..., explicit=..., version=..., tags=...) -> None: ...
class DocumentEndEvent(Event):
start_mark: Any
end_mark: Any
explicit: Any
def __init__(self, start_mark=..., end_mark=..., explicit=...) -> None: ...
class AliasEvent(NodeEvent): ...
class ScalarEvent(NodeEvent):
anchor: Any
tag: Any
implicit: Any
value: Any
start_mark: Any
end_mark: Any
style: Any
def __init__(self, anchor, tag, implicit, value, start_mark=..., end_mark=..., style=...) -> None: ...
class SequenceStartEvent(CollectionStartEvent): ...
class SequenceEndEvent(CollectionEndEvent): ...
class MappingStartEvent(CollectionStartEvent): ...
class MappingEndEvent(CollectionEndEvent): ...

View File

@@ -0,0 +1,18 @@
from yaml.composer import Composer
from yaml.constructor import BaseConstructor, Constructor, FullConstructor, SafeConstructor
from yaml.parser import Parser
from yaml.reader import Reader
from yaml.resolver import BaseResolver, Resolver
from yaml.scanner import Scanner
class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
def __init__(self, stream) -> None: ...
class FullLoader(Reader, Scanner, Parser, Composer, FullConstructor, Resolver):
def __init__(self, stream) -> None: ...
class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
def __init__(self, stream) -> None: ...
class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
def __init__(self, stream) -> None: ...

View File

@@ -0,0 +1,31 @@
from typing import Any
class Node:
tag: Any
value: Any
start_mark: Any
end_mark: Any
def __init__(self, tag, value, start_mark, end_mark) -> None: ...
class ScalarNode(Node):
id: Any
tag: Any
value: Any
start_mark: Any
end_mark: Any
style: Any
def __init__(self, tag, value, start_mark=..., end_mark=..., style=...) -> None: ...
class CollectionNode(Node):
tag: Any
value: Any
start_mark: Any
end_mark: Any
flow_style: Any
def __init__(self, tag, value, start_mark=..., end_mark=..., flow_style=...) -> None: ...
class SequenceNode(CollectionNode):
id: Any
class MappingNode(CollectionNode):
id: Any

View File

@@ -0,0 +1,45 @@
from typing import Any
from yaml.error import MarkedYAMLError
class ParserError(MarkedYAMLError): ...
class Parser:
DEFAULT_TAGS: Any
current_event: Any
yaml_version: Any
tag_handles: Any
states: Any
marks: Any
state: Any
def __init__(self) -> None: ...
def dispose(self): ...
def check_event(self, *choices): ...
def peek_event(self): ...
def get_event(self): ...
def parse_stream_start(self): ...
def parse_implicit_document_start(self): ...
def parse_document_start(self): ...
def parse_document_end(self): ...
def parse_document_content(self): ...
def process_directives(self): ...
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_block_sequence_first_entry(self): ...
def parse_block_sequence_entry(self): ...
def parse_indentless_sequence_entry(self): ...
def parse_block_mapping_first_key(self): ...
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_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_value(self): ...
def parse_flow_mapping_empty_value(self): ...
def process_empty_scalar(self, mark): ...

View File

@@ -0,0 +1,35 @@
from typing import Any
from yaml.error import YAMLError
class ReaderError(YAMLError):
name: Any
character: Any
position: Any
encoding: Any
reason: Any
def __init__(self, name, position, character, encoding, reason) -> None: ...
class Reader:
name: Any
stream: Any
stream_pointer: Any
eof: Any
buffer: Any
pointer: Any
raw_buffer: Any
raw_decode: Any
encoding: Any
index: Any
line: Any
column: Any
def __init__(self, stream) -> None: ...
def peek(self, index=...): ...
def prefix(self, length=...): ...
def forward(self, length=...): ...
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=...): ...

View File

@@ -0,0 +1,60 @@
import sys
from typing import Any
from yaml.error import YAMLError
class RepresenterError(YAMLError): ...
class BaseRepresenter:
yaml_representers: Any
yaml_multi_representers: Any
default_style: Any
default_flow_style: Any
sort_keys: bool
represented_objects: Any
object_keeper: Any
alias_key: Any
def __init__(self, default_style=..., default_flow_style=..., sort_keys: bool = ...) -> None: ...
def represent(self, data): ...
if sys.version_info < (3, 0):
def get_classobj_bases(self, cls): ...
def represent_data(self, data): ...
@classmethod
def add_representer(cls, data_type, representer): ...
@classmethod
def add_multi_representer(cls, data_type, representer): ...
def represent_scalar(self, tag, value, style=...): ...
def represent_sequence(self, tag, sequence, flow_style=...): ...
def represent_mapping(self, tag, mapping, flow_style=...): ...
def ignore_aliases(self, data): ...
class SafeRepresenter(BaseRepresenter):
def ignore_aliases(self, data): ...
def represent_none(self, data): ...
def represent_str(self, data): ...
if sys.version_info < (3, 0):
def represent_unicode(self, data): ...
def represent_long(self, data): ...
def represent_bool(self, data): ...
def represent_int(self, data): ...
inf_value: Any
def represent_float(self, data): ...
def represent_list(self, data): ...
def represent_dict(self, data): ...
def represent_set(self, data): ...
def represent_date(self, data): ...
def represent_datetime(self, data): ...
def represent_yaml_object(self, tag, data, cls, flow_style=...): ...
def represent_undefined(self, data): ...
class Representer(SafeRepresenter):
def represent_str(self, data): ...
if sys.version_info < (3, 0):
def represent_unicode(self, data): ...
def represent_long(self, data): ...
def represent_instance(self, data): ...
def represent_complex(self, data): ...
def represent_tuple(self, data): ...
def represent_name(self, data): ...
def represent_module(self, data): ...
def represent_object(self, data): ...

View File

@@ -0,0 +1,25 @@
from typing import Any
from yaml.error import YAMLError
class ResolverError(YAMLError): ...
class BaseResolver:
DEFAULT_SCALAR_TAG: Any
DEFAULT_SEQUENCE_TAG: Any
DEFAULT_MAPPING_TAG: Any
yaml_implicit_resolvers: Any
yaml_path_resolvers: Any
resolver_exact_paths: Any
resolver_prefix_paths: Any
def __init__(self) -> None: ...
@classmethod
def add_implicit_resolver(cls, tag, regexp, first): ...
@classmethod
def add_path_resolver(cls, tag, path, kind=...): ...
def descend_resolver(self, current_node, current_index): ...
def ascend_resolver(self): ...
def check_resolver_prefix(self, depth, path, kind, current_node, current_index): ...
def resolve(self, kind, value, implicit): ...
class Resolver(BaseResolver): ...

View File

@@ -0,0 +1,97 @@
from typing import Any
from yaml.error import MarkedYAMLError
class ScannerError(MarkedYAMLError): ...
class SimpleKey:
token_number: Any
required: Any
index: Any
line: Any
column: Any
mark: Any
def __init__(self, token_number, required, index, line, column, mark) -> None: ...
class Scanner:
done: Any
flow_level: Any
tokens: Any
tokens_taken: Any
indent: Any
indents: Any
allow_simple_key: Any
possible_simple_keys: Any
def __init__(self) -> None: ...
def check_token(self, *choices): ...
def peek_token(self): ...
def get_token(self): ...
def need_more_tokens(self): ...
def fetch_more_tokens(self): ...
def next_possible_simple_key(self): ...
def stale_possible_simple_keys(self): ...
def save_possible_simple_key(self): ...
def remove_possible_simple_key(self): ...
def unwind_indent(self, column): ...
def add_indent(self, column): ...
def fetch_stream_start(self): ...
def fetch_stream_end(self): ...
def fetch_directive(self): ...
def fetch_document_start(self): ...
def fetch_document_end(self): ...
def fetch_document_indicator(self, TokenClass): ...
def fetch_flow_sequence_start(self): ...
def fetch_flow_mapping_start(self): ...
def fetch_flow_collection_start(self, TokenClass): ...
def fetch_flow_sequence_end(self): ...
def fetch_flow_mapping_end(self): ...
def fetch_flow_collection_end(self, TokenClass): ...
def fetch_flow_entry(self): ...
def fetch_block_entry(self): ...
def fetch_key(self): ...
def fetch_value(self): ...
def fetch_alias(self): ...
def fetch_anchor(self): ...
def fetch_tag(self): ...
def fetch_literal(self): ...
def fetch_folded(self): ...
def fetch_block_scalar(self, style): ...
def fetch_single(self): ...
def fetch_double(self): ...
def fetch_flow_scalar(self, style): ...
def fetch_plain(self): ...
def check_directive(self): ...
def check_document_start(self): ...
def check_document_end(self): ...
def check_block_entry(self): ...
def check_key(self): ...
def check_value(self): ...
def check_plain(self): ...
def scan_to_next_token(self): ...
def scan_directive(self): ...
def scan_directive_name(self, start_mark): ...
def scan_yaml_directive_value(self, start_mark): ...
def scan_yaml_directive_number(self, start_mark): ...
def scan_tag_directive_value(self, start_mark): ...
def scan_tag_directive_handle(self, start_mark): ...
def scan_tag_directive_prefix(self, start_mark): ...
def scan_directive_ignored_line(self, start_mark): ...
def scan_anchor(self, TokenClass): ...
def scan_tag(self): ...
def scan_block_scalar(self, style): ...
def scan_block_scalar_indicators(self, start_mark): ...
def scan_block_scalar_ignored_line(self, start_mark): ...
def scan_block_scalar_indentation(self): ...
def scan_block_scalar_breaks(self, indent): ...
def scan_flow_scalar(self, style): ...
ESCAPE_REPLACEMENTS: Any
ESCAPE_CODES: Any
def scan_flow_scalar_non_spaces(self, double, start_mark): ...
def scan_flow_scalar_spaces(self, double, start_mark): ...
def scan_flow_scalar_breaks(self, double, start_mark): ...
def scan_plain(self): ...
def scan_plain_spaces(self, indent, start_mark): ...
def scan_tag_handle(self, name, start_mark): ...
def scan_tag_uri(self, name, start_mark): ...
def scan_uri_escapes(self, name, start_mark): ...
def scan_line_break(self): ...

View File

@@ -0,0 +1,24 @@
from typing import Any
from yaml.error import YAMLError
class SerializerError(YAMLError): ...
class Serializer:
ANCHOR_TEMPLATE: Any
use_encoding: Any
use_explicit_start: Any
use_explicit_end: Any
use_version: Any
use_tags: Any
serialized_nodes: Any
anchors: Any
last_anchor_id: Any
closed: Any
def __init__(self, encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> None: ...
def open(self): ...
def close(self): ...
def serialize(self, node): ...
def anchor_node(self, node): ...
def generate_anchor(self, node): ...
def serialize_node(self, node, parent, index): ...

View File

@@ -0,0 +1,93 @@
from typing import Any
class Token:
start_mark: Any
end_mark: Any
def __init__(self, start_mark, end_mark) -> None: ...
class DirectiveToken(Token):
id: Any
name: Any
value: Any
start_mark: Any
end_mark: Any
def __init__(self, name, value, start_mark, end_mark) -> None: ...
class DocumentStartToken(Token):
id: Any
class DocumentEndToken(Token):
id: Any
class StreamStartToken(Token):
id: Any
start_mark: Any
end_mark: Any
encoding: Any
def __init__(self, start_mark=..., end_mark=..., encoding=...) -> None: ...
class StreamEndToken(Token):
id: Any
class BlockSequenceStartToken(Token):
id: Any
class BlockMappingStartToken(Token):
id: Any
class BlockEndToken(Token):
id: Any
class FlowSequenceStartToken(Token):
id: Any
class FlowMappingStartToken(Token):
id: Any
class FlowSequenceEndToken(Token):
id: Any
class FlowMappingEndToken(Token):
id: Any
class KeyToken(Token):
id: Any
class ValueToken(Token):
id: Any
class BlockEntryToken(Token):
id: Any
class FlowEntryToken(Token):
id: Any
class AliasToken(Token):
id: Any
value: Any
start_mark: Any
end_mark: Any
def __init__(self, value, start_mark, end_mark) -> None: ...
class AnchorToken(Token):
id: Any
value: Any
start_mark: Any
end_mark: Any
def __init__(self, value, start_mark, end_mark) -> None: ...
class TagToken(Token):
id: Any
value: Any
start_mark: Any
end_mark: Any
def __init__(self, value, start_mark, end_mark) -> None: ...
class ScalarToken(Token):
id: Any
value: Any
plain: Any
start_mark: Any
end_mark: Any
style: Any
def __init__(self, value, plain, start_mark, end_mark, style=...) -> None: ...