INNER CODE UNIT · Python

_empty_string_to_none

stratumauth/app · extra/generate_icon_meta.py:35

def _empty_string_to_none(string: str) -> Optional[str]:
    return string if string != "" else None


def _get_current_metadata() -> MetadataMap:
    metafile_path = os.path.join(MAIN_DIR, "icons.csv")

    if not os.path.exists(metafile_path):
        return {}

    result = {}

    with open(metafile_path, "r", encoding="utf-8") as file:
        reader = csv.DictReader(file)

        for entry in reader:
            key = entry["icon"]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…