tuple of types instead of union

This commit is contained in:
sneakers-the-rat 2024-05-15 14:36:37 -07:00
parent 2b56da6808
commit 1ffdc7cd20
Signed by untrusted user who does not match committer: jonny
GPG key ID: 6DCB96EF1E4D232D

View file

@ -139,7 +139,7 @@ class Interface(ABC, Generic[T]):
"""Input types for all enabled interfaces""" """Input types for all enabled interfaces"""
in_types = [] in_types = []
for iface in cls.interfaces(): for iface in cls.interfaces():
if isinstance(iface.input_types, Union[tuple, list]): if isinstance(iface.input_types, (tuple, list)):
in_types.extend(iface.input_types) in_types.extend(iface.input_types)
else: # pragma: no cover else: # pragma: no cover
in_types.append(iface.input_types) in_types.append(iface.input_types)