##// END OF EJS Templates
inherit base aliases / flags from traitlets.config.Application...
Min RK -
Show More
@@ -66,26 +66,48 b' else:'
66 66
67 67 # aliases and flags
68 68
69 base_aliases = {
70 'profile-dir' : 'ProfileDir.location',
71 'profile' : 'BaseIPythonApplication.profile',
72 'ipython-dir' : 'BaseIPythonApplication.ipython_dir',
73 'log-level' : 'Application.log_level',
74 'config' : 'BaseIPythonApplication.extra_config_file',
69 base_aliases = {}
70 if isinstance(Application.aliases, dict):
71 # traitlets 5
72 base_aliases.update(Application.aliases)
73 base_aliases.update(
74 {
75 "profile-dir": "ProfileDir.location",
76 "profile": "BaseIPythonApplication.profile",
77 "ipython-dir": "BaseIPythonApplication.ipython_dir",
78 "log-level": "Application.log_level",
79 "config": "BaseIPythonApplication.extra_config_file",
75 80 }
81 )
76 82
77 base_flags = dict(
78 debug = ({'Application' : {'log_level' : logging.DEBUG}},
79 "set log level to logging.DEBUG (maximize logging output)"),
80 quiet = ({'Application' : {'log_level' : logging.CRITICAL}},
81 "set log level to logging.CRITICAL (minimize logging output)"),
82 init = ({'BaseIPythonApplication' : {
83 'copy_config_files' : True,
84 'auto_create' : True}
85 }, """Initialize profile with default config files. This is equivalent
83 base_flags = dict()
84 if isinstance(Application.flags, dict):
85 # traitlets 5
86 base_flags.update(Application.flags)
87 base_flags.update(
88 dict(
89 debug=(
90 {"Application": {"log_level": logging.DEBUG}},
91 "set log level to logging.DEBUG (maximize logging output)",
92 ),
93 quiet=(
94 {"Application": {"log_level": logging.CRITICAL}},
95 "set log level to logging.CRITICAL (minimize logging output)",
96 ),
97 init=(
98 {
99 "BaseIPythonApplication": {
100 "copy_config_files": True,
101 "auto_create": True,
102 }
103 },
104 """Initialize profile with default config files. This is equivalent
86 105 to running `ipython profile create <profile>` prior to startup.
87 """)
106 """,
107 ),
88 108 )
109 )
110
89 111
90 112 class ProfileAwareConfigLoader(PyFileConfigLoader):
91 113 """A Python file config loader that is aware of IPython profiles."""
General Comments 0
You need to be logged in to leave comments. Login now