Skip to content

Commit 409229d

Browse files
committed
lint
1 parent 392e933 commit 409229d

File tree

8 files changed

+32
-33
lines changed

8 files changed

+32
-33
lines changed

jupyter_client/channels.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ async def _recv(self, **kwargs) -> t.Dict[str, t.Any]:
217217
return self.session.deserialize(smsg)
218218

219219
async def get_msg(self, timeout: t.Optional[float] = None) -> t.Dict[str, t.Any]:
220-
""" Gets a message if there is one that is ready. """
220+
"""Gets a message if there is one that is ready."""
221221
assert self.socket is not None
222222
if timeout is not None:
223223
timeout *= 1000 # seconds to ms
@@ -230,7 +230,7 @@ async def get_msg(self, timeout: t.Optional[float] = None) -> t.Dict[str, t.Any]
230230
raise Empty
231231

232232
async def get_msgs(self) -> t.List[t.Dict[str, t.Any]]:
233-
""" Get all messages that are currently ready. """
233+
"""Get all messages that are currently ready."""
234234
msgs = []
235235
while True:
236236
try:
@@ -240,7 +240,7 @@ async def get_msgs(self) -> t.List[t.Dict[str, t.Any]]:
240240
return msgs
241241

242242
async def msg_ready(self) -> bool:
243-
""" Is there a message that has been received? """
243+
"""Is there a message that has been received?"""
244244
assert self.socket is not None
245245
return bool(await self.socket.poll(timeout=0))
246246

jupyter_client/session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def _new_auth(self) -> None:
465465

466466
digest_history = Set()
467467
digest_history_size = Integer(
468-
2 ** 16,
468+
2**16,
469469
config=True,
470470
help="""The maximum number of digests to remember.
471471
@@ -504,7 +504,7 @@ def _unpack_changed(self, change):
504504

505505
# thresholds:
506506
copy_threshold = Integer(
507-
2 ** 16,
507+
2**16,
508508
config=True,
509509
help="Threshold (in bytes) beyond which a buffer should be sent without copying.",
510510
)

jupyter_client/ssh/tunnel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
class SSHException(Exception): # type: ignore
2929
pass
3030

31-
3231
else:
3332
from .forward import forward_tunnel
3433

jupyter_client/tests/test_connect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_write_connection_file():
8484

8585

8686
def test_load_connection_file_session():
87-
"""test load_connection_file() after """
87+
"""test load_connection_file() after"""
8888
session = Session()
8989
app = DummyConsoleApp(session=Session())
9090
app.initialize(argv=[])
@@ -101,7 +101,7 @@ def test_load_connection_file_session():
101101

102102

103103
def test_load_connection_file_session_with_kn():
104-
"""test load_connection_file() after """
104+
"""test load_connection_file() after"""
105105
session = Session()
106106
app = DummyConsoleApp(session=Session())
107107
app.initialize(argv=[])

jupyter_client/tests/test_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
def test_connection_file_real_path():
13-
""" Verify realpath is used when formatting connection file """
13+
"""Verify realpath is used when formatting connection file"""
1414
with mock.patch("os.path.realpath") as patched_realpath:
1515
patched_realpath.return_value = "foobar"
1616
km = KernelManager(

jupyter_client/tests/test_provisioning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def test_get_new(self, kpf):
261261

262262
class TestRuntime:
263263
async def akm_test(self, kernel_mgr):
264-
"""Starts a kernel, validates the associated provisioner's config, shuts down kernel """
264+
"""Starts a kernel, validates the associated provisioner's config, shuts down kernel"""
265265

266266
assert kernel_mgr.provisioner is None
267267
if kernel_mgr.kernel_name == 'missing_provisioner':

jupyter_client/tests/test_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def test_tracking(self):
185185
def test_unique_msg_ids(self):
186186
"""test that messages receive unique ids"""
187187
ids = set()
188-
for i in range(2 ** 12):
188+
for i in range(2**12):
189189
h = self.session.msg_header("test")
190190
msg_id = h["msg_id"]
191191
self.assertTrue(msg_id not in ids)

jupyter_client/tests/utils.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -132,51 +132,51 @@ def wrapped(self, *args, **kwargs):
132132
class KMSubclass(RecordCallMixin):
133133
@subclass_recorder
134134
def start_kernel(self, **kw):
135-
""" Record call and defer to superclass """
135+
"""Record call and defer to superclass"""
136136

137137
@subclass_recorder
138138
def shutdown_kernel(self, now=False, restart=False):
139-
""" Record call and defer to superclass """
139+
"""Record call and defer to superclass"""
140140

141141
@subclass_recorder
142142
def restart_kernel(self, now=False, **kw):
143-
""" Record call and defer to superclass """
143+
"""Record call and defer to superclass"""
144144

145145
@subclass_recorder
146146
def interrupt_kernel(self):
147-
""" Record call and defer to superclass """
147+
"""Record call and defer to superclass"""
148148

149149
@subclass_recorder
150150
def request_shutdown(self, restart=False):
151-
""" Record call and defer to superclass """
151+
"""Record call and defer to superclass"""
152152

153153
@subclass_recorder
154154
def finish_shutdown(self, waittime=None, pollinterval=0.1, restart=False):
155-
""" Record call and defer to superclass """
155+
"""Record call and defer to superclass"""
156156

157157
@subclass_recorder
158158
def _launch_kernel(self, kernel_cmd, **kw):
159-
""" Record call and defer to superclass """
159+
"""Record call and defer to superclass"""
160160

161161
@subclass_recorder
162162
def _kill_kernel(self):
163-
""" Record call and defer to superclass """
163+
"""Record call and defer to superclass"""
164164

165165
@subclass_recorder
166166
def cleanup_resources(self, restart=False):
167-
""" Record call and defer to superclass """
167+
"""Record call and defer to superclass"""
168168

169169
@subclass_recorder
170170
def signal_kernel(self, signum: int):
171-
""" Record call and defer to superclass """
171+
"""Record call and defer to superclass"""
172172

173173
@subclass_recorder
174174
def is_alive(self):
175-
""" Record call and defer to superclass """
175+
"""Record call and defer to superclass"""
176176

177177
@subclass_recorder
178178
def _send_kernel_sigterm(self, restart: bool = False):
179-
""" Record call and defer to superclass """
179+
"""Record call and defer to superclass"""
180180

181181

182182
class SyncKMSubclass(KMSubclass, KernelManager):
@@ -197,43 +197,43 @@ def _kernel_manager_class_default(self):
197197

198198
@subclass_recorder
199199
def get_kernel(self, kernel_id):
200-
""" Record call and defer to superclass """
200+
"""Record call and defer to superclass"""
201201

202202
@subclass_recorder
203203
def remove_kernel(self, kernel_id):
204-
""" Record call and defer to superclass """
204+
"""Record call and defer to superclass"""
205205

206206
@subclass_recorder
207207
def start_kernel(self, kernel_name=None, **kwargs):
208-
""" Record call and defer to superclass """
208+
"""Record call and defer to superclass"""
209209

210210
@subclass_recorder
211211
def shutdown_kernel(self, kernel_id, now=False, restart=False):
212-
""" Record call and defer to superclass """
212+
"""Record call and defer to superclass"""
213213

214214
@subclass_recorder
215215
def restart_kernel(self, kernel_id, now=False):
216-
""" Record call and defer to superclass """
216+
"""Record call and defer to superclass"""
217217

218218
@subclass_recorder
219219
def interrupt_kernel(self, kernel_id):
220-
""" Record call and defer to superclass """
220+
"""Record call and defer to superclass"""
221221

222222
@subclass_recorder
223223
def request_shutdown(self, kernel_id, restart=False):
224-
""" Record call and defer to superclass """
224+
"""Record call and defer to superclass"""
225225

226226
@subclass_recorder
227227
def finish_shutdown(self, kernel_id, waittime=None, pollinterval=0.1, restart=False):
228-
""" Record call and defer to superclass """
228+
"""Record call and defer to superclass"""
229229

230230
@subclass_recorder
231231
def cleanup_resources(self, kernel_id, restart=False):
232-
""" Record call and defer to superclass """
232+
"""Record call and defer to superclass"""
233233

234234
@subclass_recorder
235235
def shutdown_all(self, now=False):
236-
""" Record call and defer to superclass """
236+
"""Record call and defer to superclass"""
237237

238238

239239
class SyncMKMSubclass(MKMSubclass, MultiKernelManager):

0 commit comments

Comments
 (0)