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