From e87b13c4ebc9356757940d57cb5d43e390fe4eca Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Fri, 24 Feb 2023 09:34:26 -0800 Subject: [PATCH] Need to check against self, since we may add new conflicts as we go --- masque/library.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/masque/library.py b/masque/library.py index c2cd9b4..d605d5e 100644 --- a/masque/library.py +++ b/masque/library.py @@ -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 rename_map = {} for old_name in temp: - if old_name in duplicates: + if old_name in self: new_name = rename_theirs(self, old_name) if new_name in self: raise LibraryError(f'Unresolved duplicate key encountered in library merge: {old_name} -> {new_name}')