add <= operator for library (returns an Abstract)

This commit is contained in:
jan 2023-10-12 01:33:04 -07:00
parent 2d88c00cd7
commit 98d33727a2

View File

@ -651,6 +651,10 @@ class ILibrary(ILibraryView, MutableMapping[str, 'Pattern'], metaclass=ABCMeta):
rename_map = self.add(other) rename_map = self.add(other)
return rename_map.get(name, name) return rename_map.get(name, name)
def __le__(self, other: Mapping[str, 'Pattern']) -> Abstract:
new_name = self << other
return self.abstract(new_name)
def dedup( def dedup(
self, self,
norm_value: int = int(1e6), norm_value: int = int(1e6),