From 64777732f822618a86a1412db489f5be6afd7470 Mon Sep 17 00:00:00 2001 From: vil02 Date: Wed, 17 Jan 2024 15:24:51 +0100 Subject: [PATCH] style: remove trailing spaces from `update_directory_md.yml` --- .github/workflows/update_directory_md.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_directory_md.yml b/.github/workflows/update_directory_md.yml index 5eca9aa..83732bd 100644 --- a/.github/workflows/update_directory_md.yml +++ b/.github/workflows/update_directory_md.yml @@ -13,17 +13,17 @@ jobs: from typing import Iterator URL_BASE = "https://github.com/TheAlgorithms/Ruby/blob/master" g_output = [] - + def good_filepaths(top_dir: str = ".") -> Iterator[str]: for dirpath, dirnames, filenames in os.walk(top_dir): dirnames[:] = [d for d in dirnames if d[0] not in "._"] for filename in filenames: if os.path.splitext(filename)[1].lower() == ".rb": yield os.path.join(dirpath, filename).lstrip("./") - + def md_prefix(i): return f"{i * ' '}*" if i else "\n##" - + def print_path(old_path: str, new_path: str) -> str: global g_output old_parts = old_path.split(os.sep) @@ -32,7 +32,7 @@ jobs: if new_part: g_output.append(f"{md_prefix(i)} {new_part.replace('_', ' ').title()}") return new_path - + def build_directory_md(top_dir: str = ".") -> str: global g_output old_path = "" @@ -47,7 +47,7 @@ jobs: return "\n".join(g_output) with open("DIRECTORY.md", "w") as out_file: out_file.write(build_directory_md(".") + "\n") - + - name: Update DIRECTORY.md run: | cat DIRECTORY.md