Skip to content

Commit 79496f0

Browse files
committed
reformat
1 parent 192fc6c commit 79496f0

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

ipykernel/inprocess/tests/test_kernel.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,19 @@ def test_stdout(self):
103103
reason="Currently don't capture during test as pytest does its own capturing"
104104
)
105105
def test_capfd(self):
106-
""" Does correctly capture fd
107-
"""
106+
"""Does correctly capture fd"""
108107
kernel = InProcessKernel()
109108

110109
with capture_output() as io:
111110
kernel.shell.run_cell('print("foo")')
112-
assert io.stdout == 'foo\n'
111+
assert io.stdout == "foo\n"
113112

114113
kc = BlockingInProcessKernelClient(kernel=kernel, session=kernel.session)
115114
kernel.frontends.append(kc)
116-
kc.execute('import os')
115+
kc.execute("import os")
117116
kc.execute('os.system("echo capfd")')
118117
out, err = assemble_output(kc.iopub_channel)
119-
assert out == 'capfd\n'
120-
118+
assert out == "capfd\n"
121119

122120
def test_getpass_stream(self):
123121
"Tests that kernel getpass accept the stream parameter"

ipykernel/iostream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import traceback
1616
from io import StringIO, TextIOBase
1717
import io
18-
import os
1918

2019
import zmq
2120
if zmq.pyzmq_version_info() >= (17, 0):
@@ -39,6 +38,7 @@
3938
# IO classes
4039
#-----------------------------------------------------------------------------
4140

41+
4242
class IOPubThread(object):
4343
"""An object for sending IOPub messages in a background thread
4444
@@ -293,7 +293,7 @@ def fileno(self):
293293
"""
294294
Things like subprocess will peak and write to the fileno() of stderr/stdout.
295295
"""
296-
if getattr(self, '_original_stdstream_copy', None) is not None:
296+
if getattr(self, "_original_stdstream_copy", None) is not None:
297297
return self._original_stdstream_copy
298298
else:
299299
raise io.UnsupportedOperation("fileno")

0 commit comments

Comments
 (0)