diff --git a/IPython/config/application.py b/IPython/config/application.py index 8a3af9d..4d695a6 100644 --- a/IPython/config/application.py +++ b/IPython/config/application.py @@ -70,7 +70,7 @@ class Application(SingletonConfigurable): # The name of the application, will usually match the name of the command # line application - app_name = Unicode(u'application') + name = Unicode(u'application') # The description of the application that is printed at the beginning # of the help. diff --git a/IPython/config/tests/test_application.py b/IPython/config/tests/test_application.py index d98166a..a8e5ac4 100644 --- a/IPython/config/tests/test_application.py +++ b/IPython/config/tests/test_application.py @@ -47,7 +47,7 @@ class Bar(Configurable): class MyApp(Application): - app_name = Unicode(u'myapp') + name = Unicode(u'myapp') running = Bool(False, config=True, help="Is the app running?") classes = List([Bar, Foo]) @@ -71,7 +71,7 @@ class TestApplication(TestCase): def test_basic(self): app = MyApp() - self.assertEquals(app.app_name, u'myapp') + self.assertEquals(app.name, u'myapp') self.assertEquals(app.running, False) self.assertEquals(app.classes, [MyApp,Bar,Foo]) self.assertEquals(app.config_file, u'') diff --git a/IPython/core/newapplication.py b/IPython/core/newapplication.py index d4210ba..f14a6b2 100644 --- a/IPython/core/newapplication.py +++ b/IPython/core/newapplication.py @@ -43,7 +43,7 @@ from IPython.utils.traitlets import Tuple, Unicode, Type class BaseIPythonApplication(Application): - app_name = Unicode(u'ipython') + name = Unicode(u'ipython') description = Unicode(u'IPython: an enhanced interactive Python shell.') version = Unicode(release.version) @@ -56,7 +56,7 @@ class BaseIPythonApplication(Application): os.path.join(get_ipython_package_dir(), u'config', u'profile') ) - config_file_paths = Tuple(Unicode) + config_file_paths = Tuple(Unicode, Unicode, Unicode) def _config_file_paths_default(self): return (os.getcwdu(), self.ipython_dir, self.builtin_profile_dir) @@ -125,7 +125,8 @@ class BaseIPythonApplication(Application): self.log.warn("Config file not found, skipping: %s" % self.config_file_name, exc_info=True) except: - if not suppress_errors: # For testing purposes + # For testing purposes. + if not suppress_errors: raise self.log.warn("Error loading config file: %s" % self.config_file_name, exc_info=True) diff --git a/docs/examples/core/appconfig.py b/docs/examples/core/appconfig.py index d0c1d10..618ecf4 100644 --- a/docs/examples/core/appconfig.py +++ b/docs/examples/core/appconfig.py @@ -56,7 +56,7 @@ class Bar(Configurable): class MyApp(Application): - app_name = Unicode(u'myapp') + name = Unicode(u'myapp') running = Bool(False, config=True, help="Is the app running?") classes = List([Bar, Foo])