Skip to content

Commit 8a160a5

Browse files
committed
flake 8 cleanup
1 parent 79496f0 commit 8a160a5

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

ipykernel/kernelapp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from tornado import ioloop
1818

1919
import zmq
20-
from zmq.eventloop import ioloop as zmq_ioloop
2120
from zmq.eventloop.zmqstream import ZMQStream
2221

2322
from IPython.core.application import (

ipykernel/kernelbase.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ def should_handle(self, stream, msg, idents):
231231
"""
232232
msg_id = msg['header']['msg_id']
233233
if msg_id in self.aborted:
234-
msg_type = msg['header']['msg_type']
235234
# is it safe to assume a msg_id will not be resubmitted?
236235
self.aborted.remove(msg_id)
237236
self._send_abort_reply(stream, msg, idents)
@@ -584,8 +583,7 @@ def complete_request(self, stream, ident, parent):
584583

585584
matches = yield gen.maybe_future(self.do_complete(code, cursor_pos))
586585
matches = json_clean(matches)
587-
completion_msg = self.session.send(stream, 'complete_reply',
588-
matches, parent, ident)
586+
self.session.send(stream, "complete_reply", matches, parent, ident)
589587

590588
def do_complete(self, code, cursor_pos):
591589
"""Override in subclasses to find completions.

ipykernel/tests/test_kernel.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def _check_status(content):
4444
def test_simple_print():
4545
"""simple print statement in kernel"""
4646
with kernel() as kc:
47-
iopub = kc.iopub_channel
4847
msg_id, content = execute(kc=kc, code="print('hi')")
4948
stdout, stderr = assemble_output(kc.get_iopub_msg)
5049
assert stdout == 'hi\n'
@@ -116,7 +115,6 @@ def test_sys_path_profile_dir():
116115
def test_subprocess_print():
117116
"""printing from forked mp.Process"""
118117
with new_kernel() as kc:
119-
iopub = kc.iopub_channel
120118

121119
_check_master(kc, expected=True)
122120
flush_channels(kc)
@@ -144,7 +142,6 @@ def test_subprocess_print():
144142
def test_subprocess_noprint():
145143
"""mp.Process without print doesn't trigger iostream mp_mode"""
146144
with kernel() as kc:
147-
iopub = kc.iopub_channel
148145

149146
np = 5
150147
code = '\n'.join([
@@ -171,7 +168,6 @@ def test_subprocess_noprint():
171168
def test_subprocess_error():
172169
"""error in mp.Process doesn't crash"""
173170
with new_kernel() as kc:
174-
iopub = kc.iopub_channel
175171

176172
code = '\n'.join([
177173
"import multiprocessing as mp",
@@ -344,8 +340,6 @@ def test_unc_paths():
344340
file_path = os.path.splitdrive(os.path.dirname(drive_file_path))[1]
345341
unc_file_path = os.path.join(unc_root, file_path[1:])
346342

347-
iopub = kc.iopub_channel
348-
349343
kc.execute("cd {0:s}".format(unc_file_path))
350344
reply = kc.get_shell_msg(block=True, timeout=TIMEOUT)
351345
assert reply['content']['status'] == 'ok'

0 commit comments

Comments
 (0)