use set() to remove any duplicates in patterns
This commit is contained in:
parent
e401f37993
commit
09615eaea6
@ -498,7 +498,7 @@ def disambiguate_pattern_names(patterns: Sequence[Pattern],
|
|||||||
be displayed. Default displays all warnings.
|
be displayed. Default displays all warnings.
|
||||||
"""
|
"""
|
||||||
used_names = []
|
used_names = []
|
||||||
for pat in patterns:
|
for pat in set(patterns):
|
||||||
# Shorten names which already exceed max-length
|
# Shorten names which already exceed max-length
|
||||||
if len(pat.name) > max_name_length:
|
if len(pat.name) > max_name_length:
|
||||||
shortened_name = pat.name[:max_name_length - suffix_length]
|
shortened_name = pat.name[:max_name_length - suffix_length]
|
||||||
|
Loading…
Reference in New Issue
Block a user