diff --git a/IPython/core/prefilter.py b/IPython/core/prefilter.py index 16032d0..7f01add 100644 --- a/IPython/core/prefilter.py +++ b/IPython/core/prefilter.py @@ -129,7 +129,7 @@ class PrefilterManager(Configurable): or :meth:`sort_transformers` method after changing the priority. """ - multi_line_specials = CBool(True, config=True) + multi_line_specials = CBool(True).tag(config=True) shell = Instance('IPython.core.interactiveshell.InteractiveShellABC', allow_none=True) def __init__(self, shell=None, **kwargs): @@ -359,12 +359,12 @@ class PrefilterManager(Configurable): class PrefilterTransformer(Configurable): """Transform a line of user input.""" - priority = Integer(100, config=True) + priority = Integer(100).tag(config=True) # Transformers don't currently use shell or prefilter_manager, but as we # move away from checkers and handlers, they will need them. shell = Instance('IPython.core.interactiveshell.InteractiveShellABC', allow_none=True) prefilter_manager = Instance('IPython.core.prefilter.PrefilterManager', allow_none=True) - enabled = Bool(True, config=True) + enabled = Bool(True).tag(config=True) def __init__(self, shell=None, prefilter_manager=None, **kwargs): super(PrefilterTransformer, self).__init__( @@ -389,10 +389,10 @@ class PrefilterTransformer(Configurable): class PrefilterChecker(Configurable): """Inspect an input line and return a handler for that line.""" - priority = Integer(100, config=True) + priority = Integer(100).tag(config=True) shell = Instance('IPython.core.interactiveshell.InteractiveShellABC', allow_none=True) prefilter_manager = Instance('IPython.core.prefilter.PrefilterManager', allow_none=True) - enabled = Bool(True, config=True) + enabled = Bool(True).tag(config=True) def __init__(self, shell=None, prefilter_manager=None, **kwargs): super(PrefilterChecker, self).__init__( @@ -411,8 +411,8 @@ class PrefilterChecker(Configurable): class EmacsChecker(PrefilterChecker): - priority = Integer(100, config=True) - enabled = Bool(False, config=True) + priority = Integer(100).tag(config=True) + enabled = Bool(False).tag(config=True) def check(self, line_info): "Emacs ipython-mode tags certain input lines." @@ -424,7 +424,7 @@ class EmacsChecker(PrefilterChecker): class MacroChecker(PrefilterChecker): - priority = Integer(250, config=True) + priority = Integer(250).tag(config=True) def check(self, line_info): obj = self.shell.user_ns.get(line_info.ifun) @@ -436,7 +436,7 @@ class MacroChecker(PrefilterChecker): class IPyAutocallChecker(PrefilterChecker): - priority = Integer(300, config=True) + priority = Integer(300).tag(config=True) def check(self, line_info): "Instances of IPyAutocall in user_ns get autocalled immediately" @@ -450,7 +450,7 @@ class IPyAutocallChecker(PrefilterChecker): class AssignmentChecker(PrefilterChecker): - priority = Integer(600, config=True) + priority = Integer(600).tag(config=True) def check(self, line_info): """Check to see if user is assigning to a var for the first time, in @@ -468,7 +468,7 @@ class AssignmentChecker(PrefilterChecker): class AutoMagicChecker(PrefilterChecker): - priority = Integer(700, config=True) + priority = Integer(700).tag(config=True) def check(self, line_info): """If the ifun is magic, and automagic is on, run it. Note: normal, @@ -492,7 +492,7 @@ class AutoMagicChecker(PrefilterChecker): class PythonOpsChecker(PrefilterChecker): - priority = Integer(900, config=True) + priority = Integer(900).tag(config=True) def check(self, line_info): """If the 'rest' of the line begins with a function call or pretty much @@ -507,11 +507,11 @@ class PythonOpsChecker(PrefilterChecker): class AutocallChecker(PrefilterChecker): - priority = Integer(1000, config=True) + priority = Integer(1000).tag(config=True) - function_name_regexp = CRegExp(re_fun_name, 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, config=True, + exclude_regexp = CRegExp(re_exclude_auto).tag(config=True, help="RegExp to exclude strings with this start from autocalling.") def check(self, line_info): @@ -611,11 +611,9 @@ class AutoHandler(PrefilterHandler): line = line_info.line ifun = line_info.ifun the_rest = line_info.the_rest - pre = line_info.pre esc = line_info.esc continue_prompt = line_info.continue_prompt obj = line_info.ofind(self.shell)['obj'] - #print 'pre <%s> ifun <%s> rest <%s>' % (pre,ifun,the_rest) # dbg # This should only be active for single-line input! if continue_prompt: