Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
anchor.py21 linesDownload Raw Back to yaml
1 2from __future__ import annotations3 4if False:  # MYPY5    from typing import Any, Dict, Optional, List, Union, Iterator  # NOQA6 7anchor_attrib = '_yaml_anchor'8 9 10class Anchor:11    __slots__ = 'value', 'always_dump'12    attrib = anchor_attrib13 14    def __init__(self) -> None:15        self.value = None16        self.always_dump = False17 18    def __repr__(self) -> Any:19        ad = ', (always dump)' if self.always_dump else ""20        return f'Anchor({self.value!r}{ad})'21 
codekingpro/portable-devtools · Team Ai