diff --git a/IPython/core/historyapp.py b/IPython/core/historyapp.py index 7a4bd32..d51426d 100644 --- a/IPython/core/historyapp.py +++ b/IPython/core/historyapp.py @@ -34,11 +34,13 @@ This is an handy alias to `ipython history trim --keep=0` class HistoryTrim(BaseIPythonApplication): description = trim_hist_help - backup = Bool(False).tag(config=True, - help="Keep the old history file as history.sqlite.") + backup = Bool(False, + help="Keep the old history file as history.sqlite." + ).tag(config=True) - keep = Int(1000).tag(config=True, - help="Number of recent lines to keep in the database.") + keep = Int(1000, + help="Number of recent lines to keep in the database." + ).tag(config=True) flags = Dict(dict( backup = ({'HistoryTrim' : {'backup' : True}}, @@ -118,11 +120,12 @@ class HistoryTrim(BaseIPythonApplication): class HistoryClear(HistoryTrim): description = clear_hist_help - keep = Int(0).tag(config=False, + keep = Int(0, help="Number of recent lines to keep in the database.") - force = Bool(False).tag(config=True, - help="Don't prompt user for confirmation") + force = Bool(False, + help="Don't prompt user for confirmation" + ).tag(config=True) flags = Dict(dict( force = ({'HistoryClear' : {'force' : True}}, diff --git a/IPython/core/prefilter.py b/IPython/core/prefilter.py index 7f01add..af6d44e 100644 --- a/IPython/core/prefilter.py +++ b/IPython/core/prefilter.py @@ -509,10 +509,12 @@ class AutocallChecker(PrefilterChecker): priority = Integer(1000).tag(config=True) - function_name_regexp = CRegExp(re_fun_name).tag(config=True, - help="RegExp to identify potential function names.") - exclude_regexp = CRegExp(re_exclude_auto).tag(config=True, - help="RegExp to exclude strings with this start from autocalling.") + function_name_regexp = CRegExp(re_fun_name, + help="RegExp to identify potential function names." + ).tag(config=True) + exclude_regexp = CRegExp(re_exclude_auto, + help="RegExp to exclude strings with this start from autocalling." + ).tag(config=True) def check(self, line_info): "Check if the initial word/function is callable and autocall is on." diff --git a/IPython/core/prompts.py b/IPython/core/prompts.py index 0704f7f..eeb2e3f 100644 --- a/IPython/core/prompts.py +++ b/IPython/core/prompts.py @@ -273,17 +273,19 @@ class PromptManager(Configurable): """) def _lazy_evaluate_fields_default(self): return lazily_evaluate.copy() - in_template = Unicode('In [\\#]: ').tag(config=True, - help="Input prompt. '\\#' will be transformed to the prompt number") - in2_template = Unicode(' .\\D.: ').tag(config=True, - help="Continuation prompt.") - out_template = Unicode('Out[\\#]: ').tag(config=True, - help="Output prompt. '\\#' will be transformed to the prompt number") - - justify = Bool(True).tag(config=True, help=""" + in_template = Unicode('In [\\#]: ', + help="Input prompt. '\\#' will be transformed to the prompt number" + ).tag(config=True) + in2_template = Unicode(' .\\D.: ', + help="Continuation prompt.").tag(config=True) + out_template = Unicode('Out[\\#]: ', + help="Output prompt. '\\#' will be transformed to the prompt number" + ).tag(config=True) + + justify = Bool(True, help=""" If True (default), each prompt will be right-aligned with the preceding one. - """) + """).tag(config=True) # We actually store the expanded templates here: templates = Dict() diff --git a/IPython/terminal/ptshell.py b/IPython/terminal/ptshell.py index 9c12e57..85dbe22 100644 --- a/IPython/terminal/ptshell.py +++ b/IPython/terminal/ptshell.py @@ -91,8 +91,9 @@ class IPythonPTLexer(Lexer): class TerminalInteractiveShell(InteractiveShell): colors_force = True - space_for_menu = Integer(6).tag(config=True, help='Number of line at the bottom of the screen ' - 'to reserve for the completion menu') + space_for_menu = Integer(6, help='Number of line at the bottom of the screen ' + 'to reserve for the completion menu' + ).tag(config=True) def _space_for_menu_changed(self, old, new): self._update_layout() @@ -108,36 +109,36 @@ class TerminalInteractiveShell(InteractiveShell): in Unix, Control-Z/Enter in Windows). By typing 'exit' or 'quit', you can force a direct exit without any confirmation.""", ) - editing_mode = Unicode('emacs').tag(config=True, + editing_mode = Unicode('emacs', help="Shortcut style to use at the prompt. 'vi' or 'emacs'.", - ) + ).tag(config=True) - mouse_support = Bool(False).tag(config=True, + mouse_support = Bool(False, help="Enable mouse support in the prompt" - ) + ).tag(config=True) - highlighting_style = Unicode('default').tag(config=True, + highlighting_style = Unicode('default', help="The name of a Pygments style to use for syntax highlighting: \n %s" % ', '.join(get_all_styles()) - ) + ).tag(config=True) def _highlighting_style_changed(self, old, new): self._style = self._make_style_from_name(self.highlighting_style) - highlighting_style_overrides = Dict().tag(config=True, + highlighting_style_overrides = Dict( help="Override highlighting format for specific tokens" - ) + ).tag(config=True) - editor = Unicode(get_default_editor()).tag(config=True, + editor = Unicode(get_default_editor(), help="Set the editor used by IPython (default to $EDITOR/vi/notepad)." - ) + ).tag(config=True) - term_title = Bool(True).tag(config=True, + term_title = Bool(True, help="Automatically set the terminal title" - ) + ).tag(config=True) - display_completions_in_columns = Bool(False).tag(config=True, + display_completions_in_columns = Bool(False, help="Display a multi column completion menu.", - ) + ).tag(config=True) @observe('term_title') def _term_title_changed(self, change):