Show More
@@ -32,6 +32,7 b' import tokenize' | |||
|
32 | 32 | import warnings |
|
33 | 33 | |
|
34 | 34 | from typing import List, Tuple, Union, Optional |
|
35 | from typing_extensions import Self | |
|
35 | 36 | from types import CodeType |
|
36 | 37 | |
|
37 | 38 | from IPython.core.inputtransformer import (leading_indent, |
@@ -637,9 +638,9 b' class IPythonInputSplitter(InputSplitter):' | |||
|
637 | 638 | # Nothing that calls reset() expects to handle transformer |
|
638 | 639 | # errors |
|
639 | 640 | pass |
|
640 | ||
|
641 | def flush_transformers(self): | |
|
642 | def _flush(transform, outs): | |
|
641 | ||
|
642 | def flush_transformers(self: Self): | |
|
643 | def _flush(transform, outs: List[str]): | |
|
643 | 644 | """yield transformed lines |
|
644 | 645 | |
|
645 | 646 | always strings, never None |
@@ -281,13 +281,14 b' class ExecutionInfo(object):' | |||
|
281 | 281 | ) |
|
282 | 282 | |
|
283 | 283 | |
|
284 |
class ExecutionResult |
|
|
284 | class ExecutionResult: | |
|
285 | 285 | """The result of a call to :meth:`InteractiveShell.run_cell` |
|
286 | 286 | |
|
287 | 287 | Stores information about what took place. |
|
288 | 288 | """ |
|
289 | execution_count = None | |
|
290 | error_before_exec = None | |
|
289 | ||
|
290 | execution_count: Optional[int] = None | |
|
291 | error_before_exec: Optional[bool] = None | |
|
291 | 292 | error_in_exec: Optional[BaseException] = None |
|
292 | 293 | info = None |
|
293 | 294 | result = None |
@@ -477,7 +478,8 b' class InteractiveShell(SingletonConfigurable):' | |||
|
477 | 478 | def input_transformers_cleanup(self): |
|
478 | 479 | return self.input_transformer_manager.cleanup_transforms |
|
479 | 480 | |
|
480 |
input_transformers_post = List( |
|
|
481 | input_transformers_post: List = List( | |
|
482 | [], | |
|
481 | 483 | help="A list of string input transformers, to be applied after IPython's " |
|
482 | 484 | "own input transformations." |
|
483 | 485 | ) |
@@ -3340,6 +3342,7 b' class InteractiveShell(SingletonConfigurable):' | |||
|
3340 | 3342 | self.displayhook.exec_result = None |
|
3341 | 3343 | |
|
3342 | 3344 | if store_history: |
|
3345 | assert self.history_manager is not None | |
|
3343 | 3346 | # Write output to the database. Does nothing unless |
|
3344 | 3347 | # history output logging is enabled. |
|
3345 | 3348 | self.history_manager.store_output(self.execution_count) |
General Comments 0
You need to be logged in to leave comments.
Login now