From 33ccc5c541fc8e838a5a1aa6a2ebd886f8da54e9 2014-11-11 18:11:57 From: Scott Sanderson Date: 2014-11-11 18:11:57 Subject: [PATCH] BUG: Use hasattr '_resolve_classes' instead of isinstance(Instance). Fixes a bug where Sequences of Type didn't have their klass correctly resolved. --- diff --git a/IPython/utils/traitlets.py b/IPython/utils/traitlets.py index 2d798d2..5939a05 100644 --- a/IPython/utils/traitlets.py +++ b/IPython/utils/traitlets.py @@ -1388,7 +1388,7 @@ class Container(Instance): def instance_init(self, obj): if isinstance(self._trait, TraitType): self._trait.this_class = self.this_class - if isinstance(self._trait, Instance): + if hasattr(self._trait, '_resolve_classes'): self._trait._resolve_classes() super(Container, self).instance_init(obj)