Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
Fixes mistaken superclass call
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahbenizzy committed Aug 11, 2022
1 parent ca529c1 commit 53126cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hamilton/experimental/h_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def __init__(self, result_builder: base.ResultMixin = None):
super(AsyncGraphAdapter, self).__init__()
self.result_builder = result_builder if result_builder else base.PandasDataFrameResult()

@staticmethod
def check_input_type(node_type: Type, input_value: Any) -> bool:
def check_input_type(self, node_type: Type, input_value: Any) -> bool:
"""Checks the input type to ensure that it is compatible with the node type.
Note that this also allows coroutines, in case you want the DAG to await
the result of calling the input.
Expand All @@ -53,7 +52,7 @@ def check_input_type(node_type: Type, input_value: Any) -> bool:
:param input_value: Type of the actual input, received
:return: Whether the actual input value matches the type expected
"""
return super().check_node_type_equivalence(node_type, input_value) or issubclass(input_value, types.CoroutineType)
return super().check_input_type(node_type, input_value) or isinstance(input_value, types.CoroutineType)

def execute_node(self, node: node.Node, kwargs: typing.Dict[str, typing.Any]) -> typing.Any:
"""Executes a node. Note this doesn't actually execute it -- rather, it returns a task.
Expand Down

0 comments on commit 53126cd

Please sign in to comment.