INNER CODE UNIT · Python

get

Zverik/every_door · tools/json_to_sqlite.py:61

    def get(self, which: ReferenceStorage, name: str, data: dict[str, dict],
            field: str) -> Optional[str]:
        if name not in which:
            return data.get(name, {}).get(field)
        return data.get(which[name], {}).get(field) or data.get(name, {}).get(field)

    def add(self, which: ReferenceStorage, value: Optional[str], name: str) -> None:
        """
        We store the field/preset name in a list for the referenced field/preset.
        When we read translations for *that* field/preset, we also add table
        entries for this one.
        """
        rname = self._get_reference(value)
        if rname:
            which[name] = rname

    @staticmethod
    def fetch(row: dict, field: str, data: dict[str, dict]) -> Optional[str]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…