Skip to content

Commit cf0ef99

Browse files
authored
Merge pull request #720 from Carreau/misc-ws
misc whitespace and line too long
2 parents 98d8126 + 63f826c commit cf0ef99

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
@@ -328,9 +328,15 @@ async def stackTrace(self, message):
328328
# or only the frames from the notebook.
329329
# We want to remove all the frames from ipykernel when they are present.
330330
try:
331-
sf_list = reply['body']['stackFrames']
332-
module_idx = len(sf_list) - next(i for i, v in enumerate(reversed(sf_list), 1) if v['name'] == '<module>' and i != 1)
333-
reply['body']['stackFrames'] = reply['body']['stackFrames'][:module_idx+1]
331+
sf_list = reply["body"]["stackFrames"]
332+
module_idx = len(sf_list) - next(
333+
i
334+
for i, v in enumerate(reversed(sf_list), 1)
335+
if v["name"] == "<module>" and i != 1
336+
)
337+
reply["body"]["stackFrames"] = reply["body"]["stackFrames"][
338+
: module_idx + 1
339+
]
334340
except StopIteration:
335341
pass
336342
return reply
@@ -476,4 +482,3 @@ async def process_request(self, message):
476482
self.log.info('The debugger has stopped')
477483

478484
return reply
479-

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
@@ -164,4 +164,3 @@ def test_install_env(tmp_path, env):
164164
assert spec['env'][k] == v
165165
else:
166166
assert 'env' not in spec
167-

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)