From b12b406df493a37cc5b6534b183224386dcbb3f7 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 1 Dec 2025 11:58:39 -0800 Subject: [PATCH 1/2] fixup! [PortPather] generalize to multi-port functions where possible --- masque/builder/pather_mixin.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/masque/builder/pather_mixin.py b/masque/builder/pather_mixin.py index 0afd132..94ccae3 100644 --- a/masque/builder/pather_mixin.py +++ b/masque/builder/pather_mixin.py @@ -533,8 +533,6 @@ class PortPather: if len(self.ports) > 1: raise BuildError(f'Unable use implicit path_into() with {len(self.ports)} (>1) ports.') self.pather.path_into(self.ports[0], *args, **kwargs) - if thru is not None: - self.rename_from(thru) return self def path_from(self, *args, **kwargs) -> Self: From 07fc8b2ad098e14477f58cae7813056901a5dd5f Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 1 Dec 2025 11:58:55 -0800 Subject: [PATCH 2/2] fixup! [PortPather] generalize to multi-port functions where possible --- masque/builder/pather_mixin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/masque/builder/pather_mixin.py b/masque/builder/pather_mixin.py index 94ccae3..1655329 100644 --- a/masque/builder/pather_mixin.py +++ b/masque/builder/pather_mixin.py @@ -610,6 +610,14 @@ class PortPather: self.ports = [mm for mm in [name_map.get(pp, pp) for pp in self.ports] if mm is not None] return self + def add_ports(self, ports: Iterable[str]) -> Self: + ports = list(ports) + conflicts = set(ports) & set(self.ports) + if conflicts: + raise BuildError(f'ports {conflicts} already selected') + self.ports += ports + return self + def add_port(self, port: str, index: int | None = None) -> Self: if port in self.ports: raise BuildError(f'{port=} already selected')