From 5780b3648007caf3567d510018286cc8f7d959b8 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Mon, 16 Jul 2018 12:53:15 +0200 Subject: [PATCH] experiment: try to autocast when possible --- bonobo/execution/contexts/node.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bonobo/execution/contexts/node.py b/bonobo/execution/contexts/node.py index a447261..e187b89 100644 --- a/bonobo/execution/contexts/node.py +++ b/bonobo/execution/contexts/node.py @@ -285,10 +285,10 @@ class NodeExecutionContext(BaseContext, WithStatistics): # Store or check input type if self._input_type is None: self._input_type = type(input_bag) - elif type(input_bag) is not self._input_type: + elif type(input_bag) != self._input_type: try: - if type(self._input_type) == tuple: - input_bag = self._input_type(tuple) + if self._input_type == tuple: + input_bag = self._input_type(input_bag) else: input_bag = self._input_type(*input_bag) except Exception as exc: