Need to check against self, since we may add new conflicts as we go
This commit is contained in:
parent
b4f36417fd
commit
e5ed28a854
@ -537,7 +537,7 @@ class MutableLibrary(Library, MutableMapping[str, 'Pattern'], metaclass=ABCMeta)
|
|||||||
temp = WrapLibrary(copy.deepcopy(dict(other))) # TODO maybe add a `mutate` arg? Might want to keep the same patterns
|
temp = WrapLibrary(copy.deepcopy(dict(other))) # TODO maybe add a `mutate` arg? Might want to keep the same patterns
|
||||||
rename_map = {}
|
rename_map = {}
|
||||||
for old_name in temp:
|
for old_name in temp:
|
||||||
if old_name in duplicates:
|
if old_name in self:
|
||||||
new_name = rename_theirs(self, old_name)
|
new_name = rename_theirs(self, old_name)
|
||||||
if new_name in self:
|
if new_name in self:
|
||||||
raise LibraryError(f'Unresolved duplicate key encountered in library merge: {old_name} -> {new_name}')
|
raise LibraryError(f'Unresolved duplicate key encountered in library merge: {old_name} -> {new_name}')
|
||||||
|
Loading…
Reference in New Issue
Block a user