aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/terminal
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
parent4a82bfdb9b900b928096ffe53670200e94ec8a23 (diff)
downloadydb-7b5df0095abcb037bd84e4682f90c04b36796e3d.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/ipython/py3/IPython/terminal')
-rw-r--r--contrib/python/ipython/py3/IPython/terminal/ipapp.py8
-rw-r--r--contrib/python/ipython/py3/IPython/terminal/prompts.py5
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():