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

import datetime
from ruamel.yaml.error import MarkedYAMLError, MarkedYAMLFutureWarning
from ruamel.yaml.nodes import *
from ruamel.yaml.comments import *
from ruamel.yaml.comments import (
    CommentedMap,
    CommentedOrderedMap,
    CommentedSeq,
    CommentedSet,
    TaggedScalar,
)
from ruamel.yaml.scalarbool import ScalarBoolean
from ruamel.yaml.timestamp import TimeStamp
from ruamel.yaml.util import timestamp_regexp

if False: ...
__all__ = [
    "BaseConstructor",
    "SafeConstructor",
    "Constructor",
    "ConstructorError",
    "RoundTripConstructor",
]

class ConstructorError(MarkedYAMLError): ...
class DuplicateKeyFutureWarning(MarkedYAMLFutureWarning): ...
class DuplicateKeyError(MarkedYAMLError): ...

class BaseConstructor:
    yaml_constructors: Dict[Any, Any] = ...
    yaml_multi_constructors: Dict[Any, Any] = ...
    def __init__(
        self, preserve_quotes: Optional[bool] = ..., loader: Any = ...
    ) -> None: ...
    @property
    def composer(self) -> Any: ...
    @property
    def resolver(self) -> Any: ...
    @property
    def scanner(self) -> Any: ...
    def check_data(self) -> Any: ...
    def get_data(self) -> Any: ...
    def get_single_data(self) -> Any: ...
    def construct_document(self, node: Any) -> Any: ...
    def construct_object(self, node: Any, deep: bool = ...) -> Any:
        """deep is True when creating an object/mapping recursively,
        in that case want the underlying elements available during construction
        """
        ...

    def construct_non_recursive_object(
        self, node: Any, tag: Optional[str] = ...
    ) -> Any: ...
    def construct_scalar(self, node: Any) -> Any: ...
    def construct_sequence(self, node: Any, deep: bool = ...) -> Any:
        """deep is True when creating an object/mapping recursively,
        in that case want the underlying elements available during construction
        """
        ...

    def construct_mapping(self, node: Any, deep: bool = ...) -> Any:
        """deep is True when creating an object/mapping recursively,
        in that case want the underlying elements available during construction
        """
        ...

    def check_mapping_key(
        self, node: Any, key_node: Any, mapping: Any, key: Any, value: Any
    ) -> bool:
        """return True if key is unique"""
        ...

    def check_set_key(
        self: Any, node: Any, key_node: Any, setting: Any, key: Any
    ) -> None: ...
    def construct_pairs(self, node: Any, deep: bool = ...) -> Any: ...
    @classmethod
    def add_constructor(cls, tag: Any, constructor: Any) -> Any: ...
    @classmethod
    def add_multi_constructor(cls, tag_prefix: Any, multi_constructor: Any) -> None: ...
    @classmethod
    def add_default_constructor(
        cls, tag: str, method: Any = ..., tag_base: str = ...
    ) -> None: ...

class SafeConstructor(BaseConstructor):
    def construct_scalar(self, node: Any) -> Any: ...
    def flatten_mapping(self, node: Any) -> Any:
        """
        This implements the merge key feature http://yaml.org/type/merge.html
        by inserting keys from the merge dict/list of dicts if not yet
        available in this node
        """
        ...

    def construct_mapping(self, node: Any, deep: bool = ...) -> Any:
        """deep is True when creating an object/mapping recursively,
        in that case want the underlying elements available during construction
        """
        ...

    def construct_yaml_null(self, node: Any) -> Any: ...

    bool_values = ...
    def construct_yaml_bool(self, node: Any) -> bool: ...
    def construct_yaml_int(self, node: Any) -> int: ...

    inf_value = ...
    nan_value = ...
    def construct_yaml_float(self, node: Any) -> float: ...
    def construct_yaml_binary(self, node: Any) -> Any: ...

    timestamp_regexp = ...
    def construct_yaml_timestamp(self, node: Any, values: Any = ...) -> Any: ...
    def construct_yaml_omap(self, node: Any) -> Any: ...
    def construct_yaml_pairs(self, node: Any) -> Any: ...
    def construct_yaml_set(self, node: Any) -> Any: ...
    def construct_yaml_str(self, node: Any) -> Any: ...
    def construct_yaml_seq(self, node: Any) -> Any: ...
    def construct_yaml_map(self, node: Any) -> Any: ...
    def construct_yaml_object(self, node: Any, cls: Any) -> Any: ...
    def construct_undefined(self, node: Any) -> None: ...

class Constructor(SafeConstructor):
    def construct_python_str(self, node: Any) -> Any: ...
    def construct_python_unicode(self, node: Any) -> Any: ...
    def construct_python_bytes(self, node: Any) -> Any: ...
    def construct_python_long(self, node: Any) -> int: ...
    def construct_python_complex(self, node: Any) -> Any: ...
    def construct_python_tuple(self, node: Any) -> Any: ...
    def find_python_module(self, name: Any, mark: Any) -> Any: ...
    def find_python_name(self, name: Any, mark: Any) -> Any: ...
    def construct_python_name(self, suffix: Any, node: Any) -> Any: ...
    def construct_python_module(self, suffix: Any, node: Any) -> Any: ...
    def make_python_instance(
        self,
        suffix: Any,
        node: Any,
        args: Any = ...,
        kwds: Any = ...,
        newobj: bool = ...,
    ) -> Any: ...
    def set_python_instance_state(self, instance: Any, state: Any) -> None: ...
    def construct_python_object(self, suffix: Any, node: Any) -> Any: ...
    def construct_python_object_apply(
        self, suffix: Any, node: Any, newobj: bool = ...
    ) -> Any: ...
    def construct_python_object_new(self, suffix: Any, node: Any) -> Any: ...
    @classmethod
    def add_default_constructor(
        cls, tag: str, method: Any = ..., tag_base: str = ...
    ) -> None: ...

class RoundTripConstructor(SafeConstructor):
    """need to store the comments on the node itself,
    as well as on the items
    """
    def comment(self, idx: Any) -> Any: ...
    def comments(self, list_of_comments: Any, idx: Optional[Any] = ...) -> Any: ...
    def construct_scalar(self, node: Any) -> Any: ...
    def construct_yaml_int(self, node: Any) -> Any: ...
    def construct_yaml_float(self, node: Any) -> Any: ...
    def construct_yaml_str(self, node: Any) -> Any: ...
    def construct_rt_sequence(
        self, node: Any, seqtyp: Any, deep: bool = ...
    ) -> Any: ...
    def flatten_mapping(self, node: Any) -> Any:
        """
        This implements the merge key feature http://yaml.org/type/merge.html
        by inserting keys from the merge dict/list of dicts if not yet
        available in this node
        """
        ...

    def construct_mapping(self, node: Any, maptyp: Any, deep: bool = ...) -> Any: ...
    def construct_setting(self, node: Any, typ: Any, deep: bool = ...) -> Any: ...
    def construct_yaml_seq(self, node: Any) -> Iterator[CommentedSeq]: ...
    def construct_yaml_map(self, node: Any) -> Iterator[CommentedMap]: ...
    def set_collection_style(self, data: Any, node: Any) -> None: ...
    def construct_yaml_object(self, node: Any, cls: Any) -> Any: ...
    def construct_yaml_omap(self, node: Any) -> Iterator[CommentedOrderedMap]: ...
    def construct_yaml_set(self, node: Any) -> Iterator[CommentedSet]: ...
    def construct_unknown(
        self, node: Any
    ) -> Iterator[Union[CommentedMap, TaggedScalar, CommentedSeq]]: ...
    def construct_yaml_timestamp(
        self, node: Any, values: Any = ...
    ) -> Union[datetime.date, datetime.datetime, TimeStamp]: ...
    def construct_yaml_sbool(self, node: Any) -> Union[bool, ScalarBoolean]: ...
