Skip to content

EnumPair

Source code in src/library_analyzer/processing/annotations/model/_annotations.py
@dataclass
class EnumPair:
    stringValue: str  # noqa: N815
    instanceName: str  # noqa: N815

    @staticmethod
    def from_dict(d: dict[str, Any]) -> EnumPair:
        return EnumPair(d["stringValue"], d["instanceName"])

    def to_dict(self) -> dict[str, Any]:
        return asdict(self)

instanceName: str instance-attribute

stringValue: str instance-attribute

__init__(stringValue, instanceName)

from_dict(d) staticmethod

Source code in src/library_analyzer/processing/annotations/model/_annotations.py
@staticmethod
def from_dict(d: dict[str, Any]) -> EnumPair:
    return EnumPair(d["stringValue"], d["instanceName"])

to_dict()

Source code in src/library_analyzer/processing/annotations/model/_annotations.py
def to_dict(self) -> dict[str, Any]:
    return asdict(self)