Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,21 @@ def execute(self, context) -> Any:
if isinstance(self.apply_function_batch, str):
self.apply_function_batch = import_string(self.apply_function_batch)

if self.apply_function is not None and not callable(self.apply_function):
raise TypeError(f"apply_function is not a callable, got {type(self.apply_function)} instead.")

if self.apply_function:
apply_callable = partial(
self.apply_function, # type: ignore
*self.apply_function_args,
**self.apply_function_kwargs,
)

if self.apply_function_batch is not None and not callable(self.apply_function_batch):
raise TypeError(
f"apply_function_batch is not a callable, got {type(self.apply_function_batch)} instead."
)

if self.apply_function_batch:
apply_callable = partial(
self.apply_function_batch, # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def execute(self, context) -> None:
if isinstance(self.producer_function, str):
self.producer_function = import_string(self.producer_function)

if self.producer_function is not None and not callable(self.producer_function):
raise TypeError(
f"producer_function is not a callable, got {type(self.producer_function)} instead."
)

producer_callable = partial(
self.producer_function, # type: ignore
*self.producer_function_args,
Expand Down