Debian Codegraph @

strictyaml/ruamel/anchor.py

raw
1 if False: # MYPY
2 from typing import Any, Dict, Optional, List, Union, Optional, Iterator # NOQA
3
4 anchor_attrib = "_yaml_anchor"
5
6
7 class Anchor(object):
8 __slots__ = "value", "always_dump"
9 attrib = anchor_attrib
10
11 def __init__(self):
12 # type: () -> None
13 self.value = None
14 self.always_dump = False
15
16 def __repr__(self):
17 # type: () -> Any
18 ad = ", (always dump)" if self.always_dump else ""
19 return "Anchor({!r}{})".format(self.value, ad)