"""
This type stub file was generated by pyright.
"""

class DuplicatedNameError(NameError): ...

class NameScope:
    def __init__(self) -> None: ...
    def is_used(self, name):  # -> bool:
        ...
    def register(self, name, deduplicate=...):  # -> str:
        ...
    def deduplicate(self, name):  # -> str:
        ...
    def get_child(self):  # -> Self:
        ...

class _StrCaching: ...

class _StringReferenceCaching:
    def get_reference(self): ...

class _HasMetadata:
    def set_metadata(self, name, node):  # -> None:
        """
        Attach unnamed metadata *node* to the metadata slot *name* of this
        value.
        """
        ...

    def _stringify_metadata(self, leading_comma: bool = ...) -> str:
        """Stringify metadata attachments (internal method)."""
        ...
