mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DS-2321 Outputs and inputs are mixed
GitOrigin-RevId: b543da51f729739413501e4cdff3ffe2b811e496
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f4cb70d9e8
commit
5eb047fe70
@@ -12,10 +12,7 @@ class PyDevDisplayHook(DisplayHook):
|
||||
super(PyDevDisplayHook, self).write_format_data(format_dict, *args,
|
||||
**kwargs)
|
||||
return
|
||||
if "text/plain" in format_dict:
|
||||
text = format_dict["text/plain"]
|
||||
if len(text) > 0 and not text.endswith("\n"):
|
||||
format_dict["text/plain"] = text + "\n"
|
||||
add_new_line_to_text(format_dict)
|
||||
format_dict["execution_count"] = str(self.shell.execution_count)
|
||||
send_rich_output(format_dict)
|
||||
|
||||
@@ -26,9 +23,17 @@ class PyDevDisplayPub(DisplayPublisher):
|
||||
if not is_supported(data):
|
||||
super(PyDevDisplayPub, self).publish(data, *args, **kwargs)
|
||||
return
|
||||
add_new_line_to_text(data)
|
||||
send_rich_output(data)
|
||||
|
||||
|
||||
def add_new_line_to_text(format_dict):
|
||||
if "text/plain" in format_dict:
|
||||
text = format_dict["text/plain"]
|
||||
if len(text) > 0 and not text.endswith("\n"):
|
||||
format_dict["text/plain"] = text + "\n"
|
||||
|
||||
|
||||
def is_supported(data):
|
||||
for type in data.keys():
|
||||
if type not in ("text/plain", "image/png", "text/html"):
|
||||
|
||||
Reference in New Issue
Block a user