Consistent all_labels reading

This commit is contained in:
2026-02-26 09:02:08 +01:00
parent f384121e9b
commit 48327fbd27
3 changed files with 18 additions and 5 deletions
+4 -1
View File
@@ -15,7 +15,10 @@ def main():
else:
work_dir = os.path.abspath(sys.argv[1])
all_labels = [l for l in (Path(work_dir) / "labels").read_text().split("\n") if l!=""]
all_labels = sorted(list(filter(None,
(Path(work_dir) / "labels")
.read_text().splitlines())),
key = natural_key)
a_rendre_path = os.path.join(work_dir, TARGET_DIR_NAME)
if not os.path.isdir(a_rendre_path):