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 | |
parent | 6ecbb0cbb39049f5c9166871ffd217e60d3494bf (diff) | |
download | ydb-0de9b4a47867a2f539f7f5f02078bc353f6fb044.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/ipython/py3/IPython/terminal')
-rw-r--r-- | contrib/python/ipython/py3/IPython/terminal/ipapp.py | 8 | ||||
-rw-r--r-- | contrib/python/ipython/py3/IPython/terminal/prompts.py | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/contrib/python/ipython/py3/IPython/terminal/ipapp.py b/contrib/python/ipython/py3/IPython/terminal/ipapp.py index eed452c935..55ff1da391 100644 --- a/contrib/python/ipython/py3/IPython/terminal/ipapp.py +++ b/contrib/python/ipython/py3/IPython/terminal/ipapp.py @@ -177,7 +177,7 @@ class LocateIPythonApp(BaseIPythonApplication): class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): - name = u'ipython' + name = "ipython" description = usage.cl_usage crash_handler_class = IPAppCrashHandler # typing: ignore[assignment] examples = _examples @@ -196,7 +196,7 @@ class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): def _classes_default(self): """This has to be in a method, for TerminalIPythonApp to be available.""" return [ - InteractiveShellApp, # ShellApp comes before TerminalApp, because + InteractiveShellApp, # ShellApp comes before TerminalApp, because self.__class__, # it will also affect subclasses (e.g. QtConsole) TerminalInteractiveShell, HistoryManager, @@ -224,9 +224,9 @@ class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): ), ) - # *do* autocreate requested profile, but don't create the config file. - auto_create=Bool(True) + auto_create = Bool(True).tag(config=True) + # configurables quick = Bool(False, help="""Start IPython quickly by skipping the loading of config files.""" 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(): |