Skip to content

Commit 63f826c

Browse files
committed
misc whitespace and line too long
Just to please flake8 Part of the #717 PR-group.
1 parent b2f1a79 commit 63f826c

File tree

8 files changed

+28
-15
lines changed

8 files changed

+28
-15
lines changed

examples/embedding/ipkernel_qtapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def add_widgets(self):
6565
#-----------------------------------------------------------------------------
6666

6767
if __name__ == "__main__":
68-
app = Qt.QApplication([])
68+
app = Qt.QApplication([])
6969
# Create our window
7070
win = SimpleWindow(app)
7171
win.show()

examples/embedding/ipkernel_wxapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, parent, title):
4242
# Create the menubar
4343
menuBar = wx.MenuBar()
4444

45-
# and a menu
45+
# and a menu
4646
menu = wx.Menu()
4747

4848
# add an item to the menu, using \tKeyName automatically

ipykernel/_eventloop_macos.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,3 @@ def mainloop(duration=1):
150150
# Run the loop manually in this case,
151151
# since there may be events still to process (ipython/ipython#9734)
152152
CoreFoundation.CFRunLoopRun()
153-

ipykernel/debugger.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,15 @@ async def stackTrace(self, message):
330330
# or only the frames from the notebook.
331331
# We want to remove all the frames from ipykernel when they are present.
332332
try:
333-
sf_list = reply['body']['stackFrames']
334-
module_idx = len(sf_list) - next(i for i, v in enumerate(reversed(sf_list), 1) if v['name'] == '<module>' and i != 1)
335-
reply['body']['stackFrames'] = reply['body']['stackFrames'][:module_idx+1]
333+
sf_list = reply["body"]["stackFrames"]
334+
module_idx = len(sf_list) - next(
335+
i
336+
for i, v in enumerate(reversed(sf_list), 1)
337+
if v["name"] == "<module>" and i != 1
338+
)
339+
reply["body"]["stackFrames"] = reply["body"]["stackFrames"][
340+
: module_idx + 1
341+
]
336342
except StopIteration:
337343
pass
338344
return reply
@@ -478,4 +484,3 @@ async def process_request(self, message):
478484
self.log.info('The debugger has stopped')
479485

480486
return reply
481-

ipykernel/eventloops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def loop_wx(kernel):
151151

152152
import wx
153153

154-
# Wx uses milliseconds
154+
# Wx uses milliseconds
155155
poll_interval = int(1000 * kernel._poll_interval)
156156

157157
def wake():

ipykernel/ipkernel.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
_asyncio_runner = None
2727

2828
try:
29-
from IPython.core.completer import rectify_completions as _rectify_completions, provisionalcompleter as _provisionalcompleter
29+
from IPython.core.completer import (
30+
rectify_completions as _rectify_completions,
31+
provisionalcompleter as _provisionalcompleter,
32+
)
3033
_use_experimental_60_completion = True
3134
except ImportError:
3235
_use_experimental_60_completion = False
@@ -195,9 +198,12 @@ def finish_metadata(self, parent, metadata, reply_content):
195198
"""
196199
# FIXME: remove deprecated ipyparallel-specific code
197200
# This is required by ipyparallel < 5.0
198-
metadata['status'] = reply_content['status']
199-
if reply_content['status'] == 'error' and reply_content['ename'] == 'UnmetDependency':
200-
metadata['dependencies_met'] = False
201+
metadata["status"] = reply_content["status"]
202+
if (
203+
reply_content["status"] == "error"
204+
and reply_content["ename"] == "UnmetDependency"
205+
):
206+
metadata["dependencies_met"] = False
201207

202208
return metadata
203209

@@ -309,7 +315,11 @@ async def run_cell(*args, **kwargs):
309315
_asyncio_runner
310316
and shell.loop_runner is _asyncio_runner
311317
and asyncio.get_event_loop().is_running()
312-
and should_run_async(code, transformed_cell=transformed_cell, preprocessing_exc_tuple=preprocessing_exc_tuple)
318+
and should_run_async(
319+
code,
320+
transformed_cell=transformed_cell,
321+
preprocessing_exc_tuple=preprocessing_exc_tuple,
322+
)
313323
):
314324
coro = run_cell(
315325
code,

ipykernel/tests/test_kernelspec.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,3 @@ def test_install_env(tmp_path, env):
165165
assert spec['env'][k] == v
166166
else:
167167
assert 'env' not in spec
168-

ipykernel/zmqshell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def ask_exit(self):
524524
payload = dict(
525525
source='ask_exit',
526526
keepkernel=self.keepkernel_on_exit,
527-
)
527+
)
528528
self.payload_manager.write_payload(payload)
529529

530530
def run_cell(self, *args, **kwargs):

0 commit comments

Comments
 (0)