add retool()

This commit is contained in:
Jan Petykiewicz 2023-06-02 21:17:07 -07:00 committed by jan
parent 3b2be804e2
commit 31d97d8df0

View File

@ -290,6 +290,18 @@ class RenderPather(PortList):
self.pattern.refs[other.name].append(ref)
return self
def retool(
self,
tool: Tool,
keys: str | Sequence[str | None] | None = None,
) -> Self:
if keys is None or isinstance(keys, str):
self.tools[keys] = tool
else:
for key in keys:
self.tools[key] = tool
return self
def path(
self,
portspec: str,