diff --git a/masque/builder/builder.py b/masque/builder/builder.py index b8b00be..fed839a 100644 --- a/masque/builder/builder.py +++ b/masque/builder/builder.py @@ -2,7 +2,7 @@ Simplified Pattern assembly (`Builder`) """ from typing import Self -from collections.abc import Sequence, Mapping +from collections.abc import Iterable, Sequence, Mapping import copy import logging from functools import wraps diff --git a/masque/ports.py b/masque/ports.py index e85b2d9..1cc711a 100644 --- a/masque/ports.py +++ b/masque/ports.py @@ -515,7 +515,7 @@ class PortList(metaclass=ABCMeta): o_offsets[:, 1] *= -1 o_rotations *= -1 - ok_pairs = {tuple(sorted(pair)) for pair in ok_connections if pair[0] != pair[1])} + ok_pairs = {tuple(sorted(pair)) for pair in ok_connections if pair[0] != pair[1]} type_conflicts = numpy.array([(st != ot) and ('unk' not in (st, ot)) and (tuple(sorted((st, ot))) not in ok_pairs) for st, ot in zip(s_types, o_types, strict=True)]) if type_conflicts.any():