Show More
@@ -129,7 +129,7 b' class PrefilterManager(Configurable):' | |||
|
129 | 129 | or :meth:`sort_transformers` method after changing the priority. |
|
130 | 130 | """ |
|
131 | 131 | |
|
132 |
multi_line_specials = CBool(True |
|
|
132 | multi_line_specials = CBool(True).tag(config=True) | |
|
133 | 133 | shell = Instance('IPython.core.interactiveshell.InteractiveShellABC', allow_none=True) |
|
134 | 134 | |
|
135 | 135 | def __init__(self, shell=None, **kwargs): |
@@ -359,12 +359,12 b' class PrefilterManager(Configurable):' | |||
|
359 | 359 | class PrefilterTransformer(Configurable): |
|
360 | 360 | """Transform a line of user input.""" |
|
361 | 361 | |
|
362 |
priority = Integer(100 |
|
|
362 | priority = Integer(100).tag(config=True) | |
|
363 | 363 | # Transformers don't currently use shell or prefilter_manager, but as we |
|
364 | 364 | # move away from checkers and handlers, they will need them. |
|
365 | 365 | shell = Instance('IPython.core.interactiveshell.InteractiveShellABC', allow_none=True) |
|
366 | 366 | prefilter_manager = Instance('IPython.core.prefilter.PrefilterManager', allow_none=True) |
|
367 |
enabled = Bool(True |
|
|
367 | enabled = Bool(True).tag(config=True) | |
|
368 | 368 | |
|
369 | 369 | def __init__(self, shell=None, prefilter_manager=None, **kwargs): |
|
370 | 370 | super(PrefilterTransformer, self).__init__( |
@@ -389,10 +389,10 b' class PrefilterTransformer(Configurable):' | |||
|
389 | 389 | class PrefilterChecker(Configurable): |
|
390 | 390 | """Inspect an input line and return a handler for that line.""" |
|
391 | 391 | |
|
392 |
priority = Integer(100 |
|
|
392 | priority = Integer(100).tag(config=True) | |
|
393 | 393 | shell = Instance('IPython.core.interactiveshell.InteractiveShellABC', allow_none=True) |
|
394 | 394 | prefilter_manager = Instance('IPython.core.prefilter.PrefilterManager', allow_none=True) |
|
395 |
enabled = Bool(True |
|
|
395 | enabled = Bool(True).tag(config=True) | |
|
396 | 396 | |
|
397 | 397 | def __init__(self, shell=None, prefilter_manager=None, **kwargs): |
|
398 | 398 | super(PrefilterChecker, self).__init__( |
@@ -411,8 +411,8 b' class PrefilterChecker(Configurable):' | |||
|
411 | 411 | |
|
412 | 412 | class EmacsChecker(PrefilterChecker): |
|
413 | 413 | |
|
414 |
priority = Integer(100 |
|
|
415 |
enabled = Bool(False |
|
|
414 | priority = Integer(100).tag(config=True) | |
|
415 | enabled = Bool(False).tag(config=True) | |
|
416 | 416 | |
|
417 | 417 | def check(self, line_info): |
|
418 | 418 | "Emacs ipython-mode tags certain input lines." |
@@ -424,7 +424,7 b' class EmacsChecker(PrefilterChecker):' | |||
|
424 | 424 | |
|
425 | 425 | class MacroChecker(PrefilterChecker): |
|
426 | 426 | |
|
427 |
priority = Integer(250 |
|
|
427 | priority = Integer(250).tag(config=True) | |
|
428 | 428 | |
|
429 | 429 | def check(self, line_info): |
|
430 | 430 | obj = self.shell.user_ns.get(line_info.ifun) |
@@ -436,7 +436,7 b' class MacroChecker(PrefilterChecker):' | |||
|
436 | 436 | |
|
437 | 437 | class IPyAutocallChecker(PrefilterChecker): |
|
438 | 438 | |
|
439 |
priority = Integer(300 |
|
|
439 | priority = Integer(300).tag(config=True) | |
|
440 | 440 | |
|
441 | 441 | def check(self, line_info): |
|
442 | 442 | "Instances of IPyAutocall in user_ns get autocalled immediately" |
@@ -450,7 +450,7 b' class IPyAutocallChecker(PrefilterChecker):' | |||
|
450 | 450 | |
|
451 | 451 | class AssignmentChecker(PrefilterChecker): |
|
452 | 452 | |
|
453 |
priority = Integer(600 |
|
|
453 | priority = Integer(600).tag(config=True) | |
|
454 | 454 | |
|
455 | 455 | def check(self, line_info): |
|
456 | 456 | """Check to see if user is assigning to a var for the first time, in |
@@ -468,7 +468,7 b' class AssignmentChecker(PrefilterChecker):' | |||
|
468 | 468 | |
|
469 | 469 | class AutoMagicChecker(PrefilterChecker): |
|
470 | 470 | |
|
471 |
priority = Integer(700 |
|
|
471 | priority = Integer(700).tag(config=True) | |
|
472 | 472 | |
|
473 | 473 | def check(self, line_info): |
|
474 | 474 | """If the ifun is magic, and automagic is on, run it. Note: normal, |
@@ -492,7 +492,7 b' class AutoMagicChecker(PrefilterChecker):' | |||
|
492 | 492 | |
|
493 | 493 | class PythonOpsChecker(PrefilterChecker): |
|
494 | 494 | |
|
495 |
priority = Integer(900 |
|
|
495 | priority = Integer(900).tag(config=True) | |
|
496 | 496 | |
|
497 | 497 | def check(self, line_info): |
|
498 | 498 | """If the 'rest' of the line begins with a function call or pretty much |
@@ -507,11 +507,11 b' class PythonOpsChecker(PrefilterChecker):' | |||
|
507 | 507 | |
|
508 | 508 | class AutocallChecker(PrefilterChecker): |
|
509 | 509 | |
|
510 |
priority = Integer(1000 |
|
|
510 | priority = Integer(1000).tag(config=True) | |
|
511 | 511 | |
|
512 |
function_name_regexp = CRegExp(re_fun_name |
|
|
512 | function_name_regexp = CRegExp(re_fun_name).tag(config=True, | |
|
513 | 513 | help="RegExp to identify potential function names.") |
|
514 |
exclude_regexp = CRegExp(re_exclude_auto |
|
|
514 | exclude_regexp = CRegExp(re_exclude_auto).tag(config=True, | |
|
515 | 515 | help="RegExp to exclude strings with this start from autocalling.") |
|
516 | 516 | |
|
517 | 517 | def check(self, line_info): |
@@ -611,11 +611,9 b' class AutoHandler(PrefilterHandler):' | |||
|
611 | 611 | line = line_info.line |
|
612 | 612 | ifun = line_info.ifun |
|
613 | 613 | the_rest = line_info.the_rest |
|
614 | pre = line_info.pre | |
|
615 | 614 | esc = line_info.esc |
|
616 | 615 | continue_prompt = line_info.continue_prompt |
|
617 | 616 | obj = line_info.ofind(self.shell)['obj'] |
|
618 | #print 'pre <%s> ifun <%s> rest <%s>' % (pre,ifun,the_rest) # dbg | |
|
619 | 617 | |
|
620 | 618 | # This should only be active for single-line input! |
|
621 | 619 | if continue_prompt: |
General Comments 0
You need to be logged in to leave comments.
Login now