Skip to content

Commit

Permalink
Adding return types
Browse files Browse the repository at this point in the history
  • Loading branch information
elvis kahoro committed Aug 29, 2022
1 parent 42d62e1 commit 4ccd0ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/gen_theme_previews.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_all_input_files(input_dir: str) -> List[str]:
return list(filter(lambda f: (f.endswith("yaml") or f.endswith("yml")), filenames))


def ensure_output_dir(output_dir: str):
def ensure_output_dir(output_dir: str) -> None:
if not os.path.exists(output_dir):
os.makedirs(output_dir)

Expand All @@ -24,7 +24,7 @@ def add_color_to_dict(
obj: Dict[str, str],
key: str,
prefix: Optional[str] = None,
):
) -> None:
if not prefix:
prefix = ""
output[f"{prefix}{key}"] = obj[key]
Expand Down Expand Up @@ -68,7 +68,7 @@ def gen_svg_for_theme(color_dict: Dict[str, str], svg_template: str) -> str:
return output


def main():
def main() -> None:
parser = argparse.ArgumentParser(
description="Generate README.md with embedded SVG previews."
)
Expand Down

0 comments on commit 4ccd0ac

Please sign in to comment.