diff options
author | smosker <smosker@yandex-team.ru> | 2022-02-10 16:48:21 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:21 +0300 |
commit | dd14d17a747a9c259858faf2fcc3ea6b92df4e15 (patch) | |
tree | f332cd81782832c17c48d8c3b4511924cd9e47fd /contrib/python/ipython/py2/IPython/terminal/prompts.py | |
parent | b637e2fa3213638fbabe52c15dad14c8237945ac (diff) | |
download | ydb-dd14d17a747a9c259858faf2fcc3ea6b92df4e15.tar.gz |
Restoring authorship annotation for <smosker@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/terminal/prompts.py')
-rw-r--r-- | contrib/python/ipython/py2/IPython/terminal/prompts.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/python/ipython/py2/IPython/terminal/prompts.py b/contrib/python/ipython/py2/IPython/terminal/prompts.py index 43c2170503..d153289c43 100644 --- a/contrib/python/ipython/py2/IPython/terminal/prompts.py +++ b/contrib/python/ipython/py2/IPython/terminal/prompts.py @@ -63,18 +63,18 @@ class RichPromptDisplayHook(DisplayHook): """Subclass of base display hook using coloured prompt""" def write_output_prompt(self): sys.stdout.write(self.shell.separate_out) - # If we're not displaying a prompt, it effectively ends with a newline, - # because the output will be left-aligned. - self.prompt_end_newline = True - + # If we're not displaying a prompt, it effectively ends with a newline, + # because the output will be left-aligned. + self.prompt_end_newline = True + 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'): - # Ask for a newline before multiline output - self.prompt_end_newline = False - + prompt_txt = ''.join(s for t, s in tokens) + if prompt_txt and not prompt_txt.endswith('\n'): + # Ask for a newline before multiline output + self.prompt_end_newline = False + if self.shell.pt_cli: self.shell.pt_cli.print_tokens(tokens) else: - sys.stdout.write(prompt_txt) + sys.stdout.write(prompt_txt) |