Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4b3b276 + 79d72d9 commit 3ac9be5Copy full SHA for 3ac9be5
1 file changed
IPython/core/magic.py
@@ -32,7 +32,7 @@
32
from IPython.utils.process import arg_split
33
from IPython.utils.py3compat import string_types, iteritems
34
from IPython.utils.text import dedent
35
-from traitlets import Bool, Dict, Instance, MetaHasTraits
+from traitlets import Bool, Dict, Instance
36
from IPython.utils.warn import error
37
38
#-----------------------------------------------------------------------------
@@ -386,7 +386,7 @@ def register(self, *magic_objects):
386
if not m.registered:
387
raise ValueError("Class of magics %r was constructed without "
388
"the @register_magics class decorator")
389
- if type(m) in (type, MetaHasTraits):
+ if isinstance(m, type):
390
# If we're given an uninstantiated class
391
m = m(shell=self.shell)
392
0 commit comments