HugrDebugInfo

class hugr.metadata.HugrDebugInfo(*args, **kwargs)[source]

Bases: Metadata[DebugRecord]

Metadata storing debug information obtained from the generator source.

Methods

from_json

Deserialize the metadata value from the stored json value.

to_json

Serialize the metadata value to a json value.

Attributes

ALIASES

Other aliases of the metadata key.

KEY

The unique key associated with the metadata entry.

ALIASES: ClassVar[list[str]] = []

Other aliases of the metadata key.

Typed metadata reads use these, in order, as fallbacks when KEY is not present. This is used for backward compatibility when renaming metadata keys.

Writes ignore this field and only write to KEY.

KEY: ClassVar[str] = 'core.debug_info'

The unique key associated with the metadata entry.

classmethod from_json(value: JsonType) DebugRecord[source]

Deserialize the metadata value from the stored json value.

classmethod to_json(value: DebugRecord) JsonType[source]

Serialize the metadata value to a json value.