From 3cb616fc6597783284e205b369b951a6a1ec4423 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sat, 11 Aug 2018 07:41:01 +0200 Subject: [PATCH] smell: switch type check with isinstance --- bonobo/execution/contexts/node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonobo/execution/contexts/node.py b/bonobo/execution/contexts/node.py index dfb2a1c..42fe811 100644 --- a/bonobo/execution/contexts/node.py +++ b/bonobo/execution/contexts/node.py @@ -177,7 +177,7 @@ class NodeExecutionContext(BaseContext, WithStatistics): if self._input_type is not None: raise RuntimeError('Cannot override input type, already have %r.', self._input_type) - if type(input_type) is not type: + if not isinstance(input_type, type): raise UnrecoverableTypeError('Input types must be regular python types.') if not issubclass(input_type, tuple):