Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanocerza committed Jun 18, 2024
1 parent 3a03fce commit 28902c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions haystack/core/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ def run(self, word: str):
there_are_non_variadics = False
for _, other_comp in to_run:
if not any(
socket.is_variadic for socket in other_comp.__haystack_input__._sockets_dict.values()
): # type: ignore
socket.is_variadic
for socket in other_comp.__haystack_input__._sockets_dict.values() # type: ignore
):
there_are_non_variadics = True
break

Expand Down Expand Up @@ -288,8 +289,9 @@ def run(self, word: str):
# waiting for input we're stuck for real and we can't make any progress.
for name, comp in waiting_for_input:
is_variadic = any(
socket.is_variadic for socket in comp.__haystack_input__._sockets_dict.values()
) # type: ignore
socket.is_variadic
for socket in comp.__haystack_input__._sockets_dict.values() # type: ignore
)
has_only_defaults = all(
not socket.is_mandatory
for socket in comp.__haystack_input__._sockets_dict.values() # type: ignore
Expand Down

0 comments on commit 28902c4

Please sign in to comment.