DS09 : Conflict resolution, and other
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user