Show More
@@ -516,15 +516,19 b' class IPythonInputSplitter(InputSplitter):' | |||
|
516 | 516 | self._buffer_raw = [] |
|
517 | 517 | self._validate = True |
|
518 | 518 | |
|
519 |
|
|
|
520 | [leading_indent(), | |
|
519 | if physical_line_transforms is not None: | |
|
520 | self.physical_line_transforms = physical_line_transforms | |
|
521 | else: | |
|
522 | self.physical_line_transforms = [leading_indent(), | |
|
521 | 523 | classic_prompt(), |
|
522 | 524 | ipy_prompt(), |
|
523 | 525 | ] |
|
524 | 526 | |
|
525 | 527 | self.assemble_logical_lines = assemble_logical_lines() |
|
526 |
|
|
|
527 | [cellmagic(), | |
|
528 | if logical_line_transforms is not None: | |
|
529 | self.logical_line_transforms = logical_line_transforms | |
|
530 | else: | |
|
531 | self.logical_line_transforms = [cellmagic(), | |
|
528 | 532 | help_end(), |
|
529 | 533 | escaped_commands(), |
|
530 | 534 | assign_from_magic(), |
@@ -532,7 +536,11 b' class IPythonInputSplitter(InputSplitter):' | |||
|
532 | 536 | ] |
|
533 | 537 | |
|
534 | 538 | self.assemble_python_lines = assemble_python_lines() |
|
535 |
|
|
|
539 | if python_line_transforms is not None: | |
|
540 | self.python_line_transforms = python_line_transforms | |
|
541 | else: | |
|
542 | # We don't use any of these at present | |
|
543 | self.python_line_transforms = [] | |
|
536 | 544 | |
|
537 | 545 | @property |
|
538 | 546 | def transforms(self): |
@@ -114,7 +114,10 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):' | |||
|
114 | 114 | exit_requested = QtCore.Signal(object) |
|
115 | 115 | |
|
116 | 116 | # Protected class variables. |
|
117 |
_prompt_transformer = IPythonInputSplitter(transforms=[classic_prompt()] |
|
|
117 | _prompt_transformer = IPythonInputSplitter(physical_line_transforms=[classic_prompt()], | |
|
118 | logical_line_transforms=[], | |
|
119 | python_line_transforms=[], | |
|
120 | ) | |
|
118 | 121 | _CallTipRequest = namedtuple('_CallTipRequest', ['id', 'pos']) |
|
119 | 122 | _CompletionRequest = namedtuple('_CompletionRequest', ['id', 'pos']) |
|
120 | 123 | _ExecutionRequest = namedtuple('_ExecutionRequest', ['id', 'kind']) |
@@ -98,7 +98,10 b' class IPythonWidget(FrontendWidget):' | |||
|
98 | 98 | |
|
99 | 99 | # FrontendWidget protected class variables. |
|
100 | 100 | _input_splitter_class = IPythonInputSplitter |
|
101 |
_prompt_transformer = IPythonInputSplitter(transforms=[ipy_prompt()] |
|
|
101 | _prompt_transformer = IPythonInputSplitter(physical_line_transforms=[ipy_prompt()], | |
|
102 | logical_line_transforms=[], | |
|
103 | python_line_transforms=[], | |
|
104 | ) | |
|
102 | 105 | |
|
103 | 106 | # IPythonWidget protected class variables. |
|
104 | 107 | _PromptBlock = namedtuple('_PromptBlock', ['block', 'length', 'number']) |
General Comments 0
You need to be logged in to leave comments.
Login now