From ac326804e7153d35e4e81ff2c08ad9455dcf2d94 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Sun, 3 Dec 2023 18:29:54 +0100 Subject: [PATCH] FIX: exclude `.egg-info` directories (#236) --- src/repoma/check_dev_files/github_workflows.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/repoma/check_dev_files/github_workflows.py b/src/repoma/check_dev_files/github_workflows.py index 9e30a330..88d1284a 100644 --- a/src/repoma/check_dev_files/github_workflows.py +++ b/src/repoma/check_dev_files/github_workflows.py @@ -206,7 +206,12 @@ def __get_package_name() -> str: if os.path.exists(f"src/{package_name}/"): return package_name src_dirs = os.listdir("src/") - candidate_dirs = [s for s in src_dirs if s.startswith(pypi_name[0].lower())] + candidate_dirs = [ + s + for s in src_dirs + if s.startswith(pypi_name[0].lower()) + if not s.endswith(".egg-info") + ] if candidate_dirs: return sorted(candidate_dirs)[0] return sorted(src_dirs)[0]