INNER CODE UNIT · Python

__init__

Zverik/every_door · tools/json_to_sqlite.py:49

    def __init__(self):
        self.presets_name: ReferenceStorage = {}
        self.fields_label: ReferenceStorage = {}
        self.fields_placeholder: ReferenceStorage = {}
        self.fields_strings: ReferenceStorage = {}

    @staticmethod
    def _get_reference(value: Optional[str]) -> Optional[str]:
        if value and len(value) >= 3 and value[0] == '{':
            return value[1:-1].strip()
        return None

    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)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…