aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/terminal/prompts.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-02-15 11:42:00 +0300
committerInnokentii Mokin <innokentii@ydb.tech>2024-02-16 18:35:18 +0000
commit7b5df0095abcb037bd84e4682f90c04b36796e3d (patch)
tree02de55e9d40978330b14e91aa6275ab8db1c2ba3 /contrib/python/ipython/py3/IPython/terminal/prompts.py
parent4a82bfdb9b900b928096ffe53670200e94ec8a23 (diff)
downloadydb-7b5df0095abcb037bd84e4682f90c04b36796e3d.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/ipython/py3/IPython/terminal/prompts.py')
-rw-r--r--contrib/python/ipython/py3/IPython/terminal/prompts.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/python/ipython/py3/IPython/terminal/prompts.py b/contrib/python/ipython/py3/IPython/terminal/prompts.py
index ca56d91a40..40a10511d9 100644
--- a/contrib/python/ipython/py3/IPython/terminal/prompts.py
+++ b/contrib/python/ipython/py3/IPython/terminal/prompts.py
@@ -103,8 +103,8 @@ class RichPromptDisplayHook(DisplayHook):
if self.do_full_cache:
tokens = self.shell.prompts.out_prompt_tokens()
- prompt_txt = ''.join(s for t, s in tokens)
- if prompt_txt and not prompt_txt.endswith('\n'):
+ prompt_txt = "".join(s for _, s in tokens)
+ if prompt_txt and not prompt_txt.endswith("\n"):
# Ask for a newline before multiline output
self.prompt_end_newline = False
@@ -116,6 +116,7 @@ class RichPromptDisplayHook(DisplayHook):
sys.stdout.write(prompt_txt)
def write_format_data(self, format_dict, md_dict=None) -> None:
+ assert self.shell is not None
if self.shell.mime_renderers:
for mime, handler in self.shell.mime_renderers.items():