"""
This type stub file was generated by pyright.
"""

from ruamel.yaml.error import YAMLError
from ruamel.yaml.events import *

if False: ...
__all__ = ["Emitter", "EmitterError"]

class EmitterError(YAMLError): ...

class ScalarAnalysis:
    def __init__(
        self,
        scalar: Any,
        empty: Any,
        multiline: Any,
        allow_flow_plain: bool,
        allow_block_plain: bool,
        allow_single_quoted: bool,
        allow_double_quoted: bool,
        allow_block: bool,
    ) -> None: ...
    def __repr__(self) -> str: ...

class Indents:
    def __init__(self) -> None: ...
    def append(self, val: Any, seq: Any) -> None: ...
    def pop(self) -> Any: ...
    def seq_seq(self) -> bool: ...
    def last_seq(self) -> bool: ...
    def seq_flow_align(
        self, seq_indent: int, column: int, pre_comment: Optional[bool] = ...
    ) -> int: ...
    def __len__(self) -> int: ...

class Emitter:
    DEFAULT_TAG_PREFIXES = ...
    MAX_SIMPLE_KEY_LENGTH = ...
    flow_seq_start = ...
    flow_seq_end = ...
    flow_seq_separator = ...
    flow_map_start = ...
    flow_map_end = ...
    flow_map_separator = ...
    def __init__(
        self,
        stream: StreamType,
        canonical: Any = ...,
        indent: Optional[int] = ...,
        width: Optional[int] = ...,
        allow_unicode: Optional[bool] = ...,
        line_break: Any = ...,
        block_seq_indent: Optional[int] = ...,
        top_level_colon_align: Optional[bool] = ...,
        prefix_colon: Any = ...,
        brace_single_entry_mapping_in_flow_sequence: Optional[bool] = ...,
        dumper: Any = ...,
    ) -> None: ...
    @property
    def stream(self) -> Any: ...
    @stream.setter
    def stream(self, val: Any) -> None: ...
    @property
    def serializer(self) -> Any: ...
    @property
    def flow_level(self) -> int: ...
    def dispose(self) -> None: ...
    def emit(self, event: Any) -> None: ...
    def need_more_events(self) -> bool: ...
    def need_events(self, count: int) -> bool: ...
    def increase_indent(
        self, flow: bool = ..., sequence: Optional[bool] = ..., indentless: bool = ...
    ) -> None: ...
    def expect_stream_start(self) -> None: ...
    def expect_nothing(self) -> None: ...
    def expect_first_document_start(self) -> Any: ...
    def expect_document_start(self, first: bool = ...) -> None: ...
    def expect_document_end(self) -> None: ...
    def expect_document_root(self) -> None: ...
    def expect_node(
        self,
        root: bool = ...,
        sequence: bool = ...,
        mapping: bool = ...,
        simple_key: bool = ...,
    ) -> None: ...
    def expect_alias(self) -> None: ...
    def expect_scalar(self) -> None: ...
    def expect_flow_sequence(self, force_flow_indent: Optional[bool] = ...) -> None: ...
    def expect_first_flow_sequence_item(self) -> None: ...
    def expect_flow_sequence_item(self) -> None: ...
    def expect_flow_mapping(
        self, single: Optional[bool] = ..., force_flow_indent: Optional[bool] = ...
    ) -> None: ...
    def expect_first_flow_mapping_key(self) -> None: ...
    def expect_flow_mapping_key(self) -> None: ...
    def expect_flow_mapping_simple_value(self) -> None: ...
    def expect_flow_mapping_value(self) -> None: ...
    def expect_block_sequence(self) -> None: ...
    def expect_first_block_sequence_item(self) -> Any: ...
    def expect_block_sequence_item(self, first: bool = ...) -> None: ...
    def expect_block_mapping(self) -> None: ...
    def expect_first_block_mapping_key(self) -> None: ...
    def expect_block_mapping_key(self, first: Any = ...) -> None: ...
    def expect_block_mapping_simple_value(self) -> None: ...
    def expect_block_mapping_value(self) -> None: ...
    def check_empty_sequence(self) -> bool: ...
    def check_empty_mapping(self) -> bool: ...
    def check_empty_document(self) -> bool: ...
    def check_simple_key(self) -> bool: ...
    def process_anchor(self, indicator: Any) -> bool: ...
    def process_tag(self) -> None: ...
    def choose_scalar_style(self) -> Any: ...
    def process_scalar(self) -> None: ...
    def prepare_version(self, version: Any) -> Any: ...
    def prepare_tag_handle(self, handle: Any) -> Any: ...
    def prepare_tag_prefix(self, prefix: Any) -> Any: ...
    def prepare_tag(self, tag: Any) -> Any: ...
    def prepare_anchor(self, anchor: Any) -> Any: ...
    def analyze_scalar(self, scalar: Any) -> Any: ...
    def flush_stream(self) -> None: ...
    def write_stream_start(self) -> None: ...
    def write_stream_end(self) -> None: ...
    def write_indicator(
        self,
        indicator: Any,
        need_whitespace: Any,
        whitespace: bool = ...,
        indention: bool = ...,
    ) -> None: ...
    def write_indent(self) -> None: ...
    def write_line_break(self, data: Any = ...) -> None: ...
    def write_version_directive(self, version_text: Any) -> None: ...
    def write_tag_directive(self, handle_text: Any, prefix_text: Any) -> None: ...
    def write_single_quoted(self, text: Any, split: Any = ...) -> None: ...

    ESCAPE_REPLACEMENTS = ...
    def write_double_quoted(self, text: Any, split: Any = ...) -> None: ...
    def determine_block_hints(self, text: Any) -> Any: ...
    def write_folded(self, text: Any, comment: Any) -> None: ...
    def write_literal(self, text: Any, comment: Any = ...) -> None: ...
    def write_plain(self, text: Any, split: Any = ...) -> None: ...
    def write_comment(self, comment: Any, pre: bool = ...) -> None: ...
    def write_pre_comment(self, event: Any) -> bool: ...
    def write_post_comment(self, event: Any) -> bool: ...

class RoundTripEmitter(Emitter):
    def prepare_tag(self, ctag: Any) -> Any: ...
