From cac4fac77f09bf952ccb9e2edf36f1c637c33c75 Mon Sep 17 00:00:00 2001 From: alexion Date: Mon, 7 Sep 2026 18:17:29 -0400 Subject: [PATCH] refactor(clew): shorten path finder name --- src/clew/clew.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/clew/clew.py b/src/clew/clew.py index fb27fc5..e7d276a 100644 --- a/src/clew/clew.py +++ b/src/clew/clew.py @@ -84,7 +84,7 @@ def extract_game_files(game_root: Path, output_path: Path) -> None: shutil.copy2(item, destination) -def matching_paths(root: Path, predicate) -> list[Path]: +def find(root: Path, predicate) -> list[Path]: matches = [] for current, _directories, files in os.walk(root): current_path = Path(current) @@ -122,7 +122,7 @@ def run_renpy_object_dump(game_root: Path, script: Path, output: Path) -> None: def dump_renpy_objects(output_root: Path, extracted_root: Path, overwrite: bool) -> None: - game_roots = matching_paths( + game_roots = find( extracted_root, lambda path: ( (path / "game").is_dir() @@ -135,7 +135,7 @@ def dump_renpy_objects(output_root: Path, extracted_root: Path, overwrite: bool) return for game_root in game_roots: - scripts = matching_paths( + scripts = find( game_root / "game", lambda path: path.is_file() and path.suffix.lower() in {".rpyc", ".rpymc"}, )