[docs]classNodeListClass(list):"""Wrapper class to be able to add attributes on a list."""__slots__=("__config_file__","__line__")__config_file__:str__line__:int|str
[docs]classNodeStrClass(str):"""Wrapper class to be able to add attributes on a string."""__slots__=("__config_file__","__line__")__config_file__:str__line__:int|strdef__voluptuous_compile__(self,schema:vol.Schema)->Any:"""Needed because vol.Schema.compile does not handle str subclasses."""return_compile_scalar(self)
[docs]classNodeDictClass(dict):"""Wrapper class to be able to add attributes on a dict."""__slots__=("__config_file__","__line__")__config_file__:str__line__:int|str
[docs]@dataclass(slots=True,frozen=True)classInput:"""Input that should be substituted."""name:str
[docs]@classmethoddeffrom_node(cls,loader:yaml.Loader,node:yaml.nodes.Node)->Input:"""Create a new placeholder from a node."""returncls(node.value)