##// END OF EJS Templates
Clean up some attributes which don't need to be traitlets
Thomas Kluyver -
Show More
@@ -27,7 +27,7 b' from IPython.core.profiledir import ProfileDir, ProfileDirError'
27 from IPython.paths import get_ipython_dir, get_ipython_package_dir
27 from IPython.paths import get_ipython_dir, get_ipython_package_dir
28 from IPython.utils.path import ensure_dir_exists
28 from IPython.utils.path import ensure_dir_exists
29 from traitlets import (
29 from traitlets import (
30 List, Unicode, Type, Bool, Dict, Set, Instance, Undefined,
30 List, Unicode, Type, Bool, Set, Instance, Undefined,
31 default, observe,
31 default, observe,
32 )
32 )
33
33
@@ -101,12 +101,12 b' class ProfileAwareConfigLoader(PyFileConfigLoader):'
101
101
102 class BaseIPythonApplication(Application):
102 class BaseIPythonApplication(Application):
103
103
104 name = Unicode(u'ipython')
104 name = u'ipython'
105 description = Unicode(u'IPython: an enhanced interactive Python shell.')
105 description = Unicode(u'IPython: an enhanced interactive Python shell.')
106 version = Unicode(release.version)
106 version = Unicode(release.version)
107
107
108 aliases = Dict(base_aliases)
108 aliases = base_aliases
109 flags = Dict(base_flags)
109 flags = base_flags
110 classes = List([ProfileDir])
110 classes = List([ProfileDir])
111
111
112 # enable `load_subconfig('cfg.py', profile='name')`
112 # enable `load_subconfig('cfg.py', profile='name')`
@@ -15,7 +15,7 b' import sys'
15 import warnings
15 import warnings
16
16
17 from traitlets.config.loader import Config
17 from traitlets.config.loader import Config
18 from traitlets.config.application import boolean_flag, catch_config_error, Application
18 from traitlets.config.application import boolean_flag, catch_config_error
19 from IPython.core import release
19 from IPython.core import release
20 from IPython.core import usage
20 from IPython.core import usage
21 from IPython.core.completer import IPCompleter
21 from IPython.core.completer import IPCompleter
@@ -35,7 +35,7 b' from IPython.extensions.storemagic import StoreMagics'
35 from .interactiveshell import TerminalInteractiveShell
35 from .interactiveshell import TerminalInteractiveShell
36 from IPython.paths import get_ipython_dir
36 from IPython.paths import get_ipython_dir
37 from traitlets import (
37 from traitlets import (
38 Bool, List, Dict, default, observe, Type
38 Bool, List, default, observe, Type
39 )
39 )
40
40
41 #-----------------------------------------------------------------------------
41 #-----------------------------------------------------------------------------
@@ -164,11 +164,11 b' aliases.update(shell_aliases)'
164
164
165 class LocateIPythonApp(BaseIPythonApplication):
165 class LocateIPythonApp(BaseIPythonApplication):
166 description = """print the path to the IPython dir"""
166 description = """print the path to the IPython dir"""
167 subcommands = Dict(dict(
167 subcommands = dict(
168 profile=('IPython.core.profileapp.ProfileLocate',
168 profile=('IPython.core.profileapp.ProfileLocate',
169 "print the path to an IPython profile directory",
169 "print the path to an IPython profile directory",
170 ),
170 ),
171 ))
171 )
172 def start(self):
172 def start(self):
173 if self.subapp is not None:
173 if self.subapp is not None:
174 return self.subapp.start()
174 return self.subapp.start()
@@ -182,8 +182,8 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):'
182 crash_handler_class = IPAppCrashHandler
182 crash_handler_class = IPAppCrashHandler
183 examples = _examples
183 examples = _examples
184
184
185 flags = Dict(flags)
185 flags = flags
186 aliases = Dict(aliases)
186 aliases = aliases
187 classes = List()
187 classes = List()
188
188
189 interactive_shell_class = Type(
189 interactive_shell_class = Type(
General Comments 0
You need to be logged in to leave comments. Login now