# Path: strictyaml/ruamel/anchor.py
# class Anchor(object):
#     __slots__ = "value", "always_dump"
#     attrib = anchor_attrib
# 
#     def __init__(self):
#         # type: () -> None
#         self.value = None
#         self.always_dump = False
# 
#     def __repr__(self):
#         # type: () -> Any
#         ad = ", (always dump)" if self.always_dump else ""
#         return "Anchor({!r}{})".format(self.value, ad)


from strictyaml.ruamel.anchor import Anchor
    from typing import Text, Any, Dict, List  # NOQA

"""
You cannot subclass bool, and this is necessary for round-tripping anchored
bool values (and also if you want to preserve the original way of writing)

bool.__bases__ is type 'int', so that is what is used as the basis for ScalarBoolean as well.

You can use these in an if statement, but not when testing equivalence
"""


if False:  # MYPY

__all__ = ["ScalarBoolean"]

# no need for no_limit_int -> int


class ScalarBoolean(int):
    def __new__(cls, *args, **kw):
        # type: (Any, Any, Any) -> Any
        anchor = kw.pop("anchor", None)  # type: ignore
        b = int.__new__(cls, *args, **kw)  # type: ignore
        if anchor is not None:
            b.yaml_set_anchor(anchor, always_dump=True)
        return b

    @property
    def anchor(self):
        # type: () -> Any

# Path: strictyaml/ruamel/anchor.py
# class Anchor(object):
#     __slots__ = "value", "always_dump"
#     attrib = anchor_attrib
# 
#     def __init__(self):
#         # type: () -> None
#         self.value = None
#         self.always_dump = False
# 
#     def __repr__(self):
#         # type: () -> Any
#         ad = ", (always dump)" if self.always_dump else ""
#         return "Anchor({!r}{})".format(self.value, ad)


# Path: strictyaml/ruamel/scalarbool.py
from strictyaml.ruamel.anchor import Anchor
    from typing import Text, Any, Dict, List  # NOQA


"""
You cannot subclass bool, and this is necessary for round-tripping anchored
bool values (and also if you want to preserve the original way of writing)

bool.__bases__ is type 'int', so that is what is used as the basis for ScalarBoolean as well.

You can use these in an if statement, but not when testing equivalence
"""


if False:  # MYPY

__all__ = ["ScalarBoolean"]

# no need for no_limit_int -> int


class ScalarBoolean(int):
    def __new__(cls, *args, **kw):
        # type: (Any, Any, Any) -> Any
        anchor = kw.pop("anchor", None)  # type: ignore
        b = int.__new__(cls, *args, **kw)  # type: ignore
        if anchor is not None:
            b.yaml_set_anchor(anchor, always_dump=True)
        return b

    @property
    def anchor(self):
        # type: () -> Any

        if not hasattr(self, Anchor.attrib):