add lshift operator to MutableLibrary
This commit is contained in:
parent
2449486a28
commit
38585e5a9e
@ -587,6 +587,9 @@ class MutableLibrary(Library, MutableMapping[str, 'Pattern'], metaclass=ABCMeta)
|
||||
self.add(tree.library, rename_theirs=rename_theirs)
|
||||
return name
|
||||
|
||||
def __lshift__(self, other: 'Tree') -> str:
|
||||
return self.add_tree(other)
|
||||
|
||||
def dedup(
|
||||
self: ML,
|
||||
norm_value: int = int(1e6),
|
||||
@ -1031,9 +1034,6 @@ class Tree(MutableLibrary):
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.library[key]
|
||||
|
||||
def __lshift__(self, other: 'Tree') -> str:
|
||||
return self.add_tree(other)
|
||||
|
||||
|
||||
def _rename_patterns(lib: Library, name: str) -> str:
|
||||
# TODO document rename function
|
||||
|
Loading…
Reference in New Issue
Block a user