Show More
@@ -30,7 +30,7 b' from IPython.external.decorator import decorator' | |||||
30 | from IPython.utils.ipstruct import Struct |
|
30 | from IPython.utils.ipstruct import Struct | |
31 | from IPython.utils.process import arg_split |
|
31 | from IPython.utils.process import arg_split | |
32 | from IPython.utils.text import dedent |
|
32 | from IPython.utils.text import dedent | |
33 | from IPython.utils.traitlets import Bool, Dict, Instance |
|
33 | from IPython.utils.traitlets import Bool, Dict, Instance, MetaHasTraits | |
34 | from IPython.utils.warn import error, warn |
|
34 | from IPython.utils.warn import error, warn | |
35 |
|
35 | |||
36 | #----------------------------------------------------------------------------- |
|
36 | #----------------------------------------------------------------------------- | |
@@ -355,10 +355,10 b' class MagicsManager(Configurable):' | |||||
355 | for m in magic_objects: |
|
355 | for m in magic_objects: | |
356 | if not m.registered: |
|
356 | if not m.registered: | |
357 | raise ValueError("Class of magics %r was constructed without " |
|
357 | raise ValueError("Class of magics %r was constructed without " | |
358 |
"the @register_ma |
|
358 | "the @register_magics class decorator") | |
359 |
if type(m) i |
|
359 | if type(m) in (type, MetaHasTraits): | |
360 | # If we're given an uninstantiated class |
|
360 | # If we're given an uninstantiated class | |
361 | m = m(self.shell) |
|
361 | m = m(shell=self.shell) | |
362 |
|
362 | |||
363 | # Now that we have an instance, we can register it and update the |
|
363 | # Now that we have an instance, we can register it and update the | |
364 | # table of callables |
|
364 | # table of callables |
General Comments 0
You need to be logged in to leave comments.
Login now