diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-02-15 11:42:00 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-02-15 11:57:41 +0300 |
commit | 0de9b4a47867a2f539f7f5f02078bc353f6fb044 (patch) | |
tree | e60d2593309655d66f72d1a61ea42980313379ca /contrib/python/ipython/py3/IPython/terminal/prompts.py | |
parent | 6ecbb0cbb39049f5c9166871ffd217e60d3494bf (diff) | |
download | ydb-0de9b4a47867a2f539f7f5f02078bc353f6fb044.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.py | 5 |
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 ca56d91a405..40a10511d9a 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(): |