From a50d6b29032ff28e6b44c59032d95069cefcd2b5 Mon Sep 17 00:00:00 2001 From: elvis kahoro Date: Sat, 30 Jul 2022 13:22:17 -0400 Subject: [PATCH] Lint --- scripts/gen_theme_previews.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/gen_theme_previews.py b/scripts/gen_theme_previews.py index cb85a1d..892cf31 100644 --- a/scripts/gen_theme_previews.py +++ b/scripts/gen_theme_previews.py @@ -8,18 +8,15 @@ from typing import Tuple import yaml - def get_all_input_files(input_dir: str) -> List[str]: filenames = next(os.walk(input_dir), (None, None, []))[2] files = filter(lambda f: (f.endswith("yaml") or f.endswith("yml")), filenames) return list(files) - def ensure_output_dir(output_dir: str): if not os.path.exists(output_dir): os.makedirs(output_dir) - def add_color_to_dict( output: Dict[str, str], obj: Dict[str, str], key: str, prefix: Optional[str] = None ): @@ -27,7 +24,6 @@ def add_color_to_dict( prefix = "" output[f"{prefix}{key}"] = obj[key] - def get_color_dict(input_dir: str, file_name: str) -> Dict[str, str]: file = open(os.path.join(input_dir, file_name), "r") loaded_theme = yaml.safe_load(file) @@ -46,7 +42,6 @@ def get_color_dict(input_dir: str, file_name: str) -> Dict[str, str]: return output - def file_name_to_display(file_name: str) -> str: file_name = Path(file_name).with_suffix("").name @@ -56,7 +51,6 @@ def file_name_to_display(file_name: str) -> str: output.append(s.capitalize()) return " ".join(output) - def gen_svg_for_theme(color_dict: Dict[str, str], svg_template: str) -> str: output = svg_template @@ -65,7 +59,6 @@ def gen_svg_for_theme(color_dict: Dict[str, str], svg_template: str) -> str: output = output.replace(f"{{{key}}}", value) return output - def main(): parser = argparse.ArgumentParser( description="Generate README.md with embedded SVG previews." @@ -124,6 +117,5 @@ def main(): with open(os.path.join(output_dir, "README.md"), "w") as output: output.write(output_str) - if __name__ == "__main__": main()