# Path: strictyaml/ruamel/error.py
# class YAMLError(Exception):
#     pass
# 
# class FileMark(StreamMark):
#     __slots__ = ()
# 
# class StringMark(StreamMark):
#     __slots__ = "name", "index", "line", "column", "buffer", "pointer"
# 
#     def __init__(self, name, index, line, column, buffer, pointer):
#         # type: (Any, int, int, int, Any, Any) -> None
#         StreamMark.__init__(self, name, index, line, column)
#         self.buffer = buffer
#         self.pointer = pointer
# 
#     def get_snippet(self, indent=4, max_length=75):
#         # type: (int, int) -> Any
#         if self.buffer is None:  # always False
#             return None
#         head = ""
#         start = self.pointer
#         while start > 0 and self.buffer[start - 1] not in u"\0\r\n\x85\u2028\u2029":
#             start -= 1
#             if self.pointer - start > max_length / 2 - 1:
#                 head = " ... "
#                 start += 5
#                 break
#         tail = ""
#         end = self.pointer
#         while (
#             end < len(self.buffer) and self.buffer[end] not in u"\0\r\n\x85\u2028\u2029"
#         ):
#             end += 1
#             if end - self.pointer > max_length / 2 - 1:
#                 tail = " ... "
#                 end -= 5
#                 break
#         snippet = utf8(self.buffer[start:end])
#         caret = "^"
#         caret = "^ (line: {})".format(self.line + 1)
#         return (
#             " " * indent
#             + head
#             + snippet
#             + tail
#             + "\n"
#             + " " * (indent + self.pointer - start + len(head))
#             + caret
#         )
# 
#     def __str__(self):
#         # type: () -> Any
#         snippet = self.get_snippet()
#         where = '  in "%s", line %d, column %d' % (
#             self.name,
#             self.line + 1,
#             self.column + 1,
#         )
#         if snippet is not None:
#             where += ":\n" + snippet
#         return where
# 
# class YAMLStreamError(Exception):
#     pass
# 
# Path: strictyaml/ruamel/compat.py
# _DEFAULT_YAML_VERSION = (1, 2)
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
#     MAXSIZE = sys.maxsize
# UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2
# DBG_TOKEN = 1
# DBG_EVENT = 2
# DBG_NODE = 4
#     class ordereddict(OrderedDict):  # type: ignore
#     class ObjectCounter(object):
# class Nprint(object):
# class MutableSliceableSequence(MutableSequence):  # type: ignore
#             def insert(self, pos, key, value):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
# def with_metaclass(meta, *bases):
#         def __init__(self):
#         def __call__(self, k):
#         def dump(self):
# def dbg(val=None):
#     def __init__(self, file_name=None):
#     def __call__(self, *args, **kw):
#     def set_max_print(self, i):
# def check_namespace_char(ch):
# def check_anchorname_char(ch):
# def version_tnf(t1, t2=None):
#     def __getitem__(self, index):
#     def __setitem__(self, index, value):
#     def __delitem__(self, index):
#     def __getsingleitem__(self, index):
#     def __setsingleitem__(self, index, value):
#     def __delsingleitem__(self, index):
# 
# Path: strictyaml/ruamel/util.py
# class LazyEval(object):
#     def __init__(self, func, *args, **kwargs):
#         def lazy_self():
#     def __getattribute__(self, name):
#     def __setattr__(self, name, value):
# def load_yaml_guess_indent(stream, **kw):
#     def leading_spaces(line):
# def configobj_walker(cfg):
# def _walk_section(s, level=0):


import codecs
from strictyaml.ruamel.error import YAMLError, FileMark, StringMark, YAMLStreamError
from strictyaml.ruamel.compat import text_type, binary_type, PY3, UNICODE_SIZE
from strictyaml.ruamel.util import RegExp
    from typing import Any, Dict, Optional, List, Union, Text, Tuple, Optional  # NOQA

    def check_printable(self, data):
        # type: (Any) -> None
        non_printable_match = self._get_non_printable(data)
        if non_printable_match is not None:
            start, character = non_printable_match
            position = self.index + (len(self.buffer) - self.pointer) + start
            raise ReaderError(
                self.name,
                position,
                ord(character),
                "unicode",
                "special characters are not allowed",
            )

    def update(self, length):
        # type: (int) -> None
        if self.raw_buffer is None:
            return
        self.buffer = self.buffer[self.pointer :]
        self.pointer = 0
        while len(self.buffer) < length:
            if not self.eof:
                self.update_raw()
            if self.raw_decode is not None:
                try:
                    data, converted = self.raw_decode(
                        self.raw_buffer, "strict", self.eof
                    )
                except UnicodeDecodeError as exc:

# Path: strictyaml/ruamel/error.py
# class YAMLError(Exception):
#     pass
# 
# class FileMark(StreamMark):
#     __slots__ = ()
# 
# class StringMark(StreamMark):
#     __slots__ = "name", "index", "line", "column", "buffer", "pointer"
# 
#     def __init__(self, name, index, line, column, buffer, pointer):
#         # type: (Any, int, int, int, Any, Any) -> None
#         StreamMark.__init__(self, name, index, line, column)
#         self.buffer = buffer
#         self.pointer = pointer
# 
#     def get_snippet(self, indent=4, max_length=75):
#         # type: (int, int) -> Any
#         if self.buffer is None:  # always False
#             return None
#         head = ""
#         start = self.pointer
#         while start > 0 and self.buffer[start - 1] not in u"\0\r\n\x85\u2028\u2029":
#             start -= 1
#             if self.pointer - start > max_length / 2 - 1:
#                 head = " ... "
#                 start += 5
#                 break
#         tail = ""
#         end = self.pointer
#         while (
#             end < len(self.buffer) and self.buffer[end] not in u"\0\r\n\x85\u2028\u2029"
#         ):
#             end += 1
#             if end - self.pointer > max_length / 2 - 1:
#                 tail = " ... "
#                 end -= 5
#                 break
#         snippet = utf8(self.buffer[start:end])
#         caret = "^"
#         caret = "^ (line: {})".format(self.line + 1)
#         return (
#             " " * indent
#             + head
#             + snippet
#             + tail
#             + "\n"
#             + " " * (indent + self.pointer - start + len(head))
#             + caret
#         )
# 
#     def __str__(self):
#         # type: () -> Any
#         snippet = self.get_snippet()
#         where = '  in "%s", line %d, column %d' % (
#             self.name,
#             self.line + 1,
#             self.column + 1,
#         )
#         if snippet is not None:
#             where += ":\n" + snippet
#         return where
# 
# class YAMLStreamError(Exception):
#     pass
# 
# Path: strictyaml/ruamel/compat.py
# _DEFAULT_YAML_VERSION = (1, 2)
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
#     MAXSIZE = sys.maxsize
# UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2
# DBG_TOKEN = 1
# DBG_EVENT = 2
# DBG_NODE = 4
#     class ordereddict(OrderedDict):  # type: ignore
#     class ObjectCounter(object):
# class Nprint(object):
# class MutableSliceableSequence(MutableSequence):  # type: ignore
#             def insert(self, pos, key, value):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
# def with_metaclass(meta, *bases):
#         def __init__(self):
#         def __call__(self, k):
#         def dump(self):
# def dbg(val=None):
#     def __init__(self, file_name=None):
#     def __call__(self, *args, **kw):
#     def set_max_print(self, i):
# def check_namespace_char(ch):
# def check_anchorname_char(ch):
# def version_tnf(t1, t2=None):
#     def __getitem__(self, index):
#     def __setitem__(self, index, value):
#     def __delitem__(self, index):
#     def __getsingleitem__(self, index):
#     def __setsingleitem__(self, index, value):
#     def __delsingleitem__(self, index):
# 
# Path: strictyaml/ruamel/util.py
# class LazyEval(object):
#     def __init__(self, func, *args, **kwargs):
#         def lazy_self():
#     def __getattribute__(self, name):
#     def __setattr__(self, name, value):
# def load_yaml_guess_indent(stream, **kw):
#     def leading_spaces(line):
# def configobj_walker(cfg):
# def _walk_section(s, level=0):


# Path: strictyaml/ruamel/reader.py
import codecs
from strictyaml.ruamel.error import YAMLError, FileMark, StringMark, YAMLStreamError
from strictyaml.ruamel.compat import text_type, binary_type, PY3, UNICODE_SIZE
from strictyaml.ruamel.util import RegExp
    from typing import Any, Dict, Optional, List, Union, Text, Tuple, Optional  # NOQA


    def check_printable(self, data):
        # type: (Any) -> None
        non_printable_match = self._get_non_printable(data)
        if non_printable_match is not None:
            start, character = non_printable_match
            position = self.index + (len(self.buffer) - self.pointer) + start
            raise ReaderError(
                self.name,
                position,
                ord(character),
                "unicode",
                "special characters are not allowed",
            )

    def update(self, length):
        # type: (int) -> None
        if self.raw_buffer is None:
            return
        self.buffer = self.buffer[self.pointer :]
        self.pointer = 0
        while len(self.buffer) < length:
            if not self.eof:
                self.update_raw()
            if self.raw_decode is not None:
                try:
                    data, converted = self.raw_decode(
                        self.raw_buffer, "strict", self.eof
                    )
                except UnicodeDecodeError as exc:

                    if PY3: