DS09 : Conflict resolution, and other

This commit is contained in:
2026-06-29 13:29:28 +02:00
parent 27c0dae20e
commit 121bd0714a
6 changed files with 377 additions and 65 deletions
+8 -1
View File
@@ -143,6 +143,13 @@ def main():
continue
base_prefix = os.path.commonprefix(safe_labels).strip()
if base_prefix and previous_prefix is not None:
if natural_key(base_prefix) < natural_key(previous_prefix):
base_prefix_maybe = f"{safe_labels[0]}+"
if natural_key(base_prefix_maybe) > natural_key(previous_prefix):
base_prefix = base_prefix_maybe
if not base_prefix:
base_prefix = "Group"
@@ -156,7 +163,7 @@ def main():
if counter == 2 and previous_prefix and previous_prefix in unique_prefix:
unique_prefix = f"{previous_prefix}-{counter}"
elif counter == 2:
previous_prefx = unique_prefix
previous_prefix = unique_prefix
used_prefixes.add(unique_prefix)