Skip to content

Commit 8dc02a8

Browse files
committed
run-pre-commit
1 parent 1d4b0c9 commit 8dc02a8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ipykernel/zmqshell.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
from IPython.core.autocall import ZMQExitAutocall
2727
from IPython.core.displaypub import DisplayPublisher
2828
from IPython.core.error import UsageError
29+
from IPython.core.history import HistoryOutput
2930
from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC
3031
from IPython.core.magic import Magics, line_magic, magics_class
3132
from IPython.core.magics import CodeMagics, MacroToEdit # type:ignore[attr-defined]
3233
from IPython.core.usage import default_banner
33-
from IPython.core.history import HistoryOutput
3434
from IPython.display import Javascript, display
3535
from IPython.utils import openpy
3636
from IPython.utils.process import arg_split, system # type:ignore[attr-defined]
@@ -116,7 +116,7 @@ def publish( # type:ignore[override]
116116
update : bool, optional, keyword-only
117117
If True, send an update_display_data message instead of display_data.
118118
"""
119-
if self.shell is not None and hasattr(self.shell, 'history_manager'):
119+
if self.shell is not None and hasattr(self.shell, "history_manager"):
120120
outputs = self.shell.history_manager.outputs
121121
outputs[self.shell.execution_count].append(
122122
HistoryOutput(output_type="display_data", bundle=data)

tests/test_zmq_shell.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_display_stored_in_history(self):
221221

222222
self.disp_pub.shell = mock_shell
223223

224-
data = {'text/plain': 'test output'}
224+
data = {"text/plain": "test output"}
225225
self.disp_pub.publish(data)
226226

227227
# Check that output was stored in history
@@ -230,6 +230,7 @@ def test_display_stored_in_history(self):
230230
assert stored_outputs[0].output_type == "display_data"
231231
assert stored_outputs[0].bundle == data
232232

233+
233234
def test_magics(tmp_path):
234235
context = zmq.Context()
235236
socket = context.socket(zmq.PUB)

0 commit comments

Comments
 (0)