Skip to content

Commit 19dbf1b

Browse files
pre-commit-ci[bot]davidbrochartblink1073
authored
[pre-commit.ci] pre-commit autoupdate (#928)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: David Brochart <[email protected]> Co-authored-by: Steven Silvester <[email protected]>
1 parent 5a12a38 commit 19dbf1b

13 files changed

+14
-22
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
- id: trailing-whitespace
2121

2222
- repo: https://github.com/python-jsonschema/check-jsonschema
23-
rev: 0.19.2
23+
rev: 0.21.0
2424
hooks:
2525
- id: check-github-workflows
2626

@@ -30,12 +30,12 @@ repos:
3030
- id: mdformat
3131

3232
- repo: https://github.com/psf/black
33-
rev: 22.12.0
33+
rev: 23.1.0
3434
hooks:
3535
- id: black
3636

3737
- repo: https://github.com/charliermarsh/ruff-pre-commit
38-
rev: v0.0.236
38+
rev: v0.0.243
3939
hooks:
4040
- id: ruff
4141
args: ["--fix"]

jupyter_client/localinterfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def _load_ips_ip():
128128
addrs = []
129129
for line in lines:
130130
blocks = line.lower().split()
131-
if (len(blocks) >= 2) and (blocks[0] == "inet"): # noqa
131+
if (len(blocks) >= 2) and (blocks[0] == "inet"):
132132
addrs.append(blocks[1].split("/")[0])
133133
_populate_from_list(addrs)
134134

jupyter_client/multikernelmanager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,6 @@ def new_kernel_id(self, **kwargs: t.Any) -> str:
533533

534534

535535
class AsyncMultiKernelManager(MultiKernelManager):
536-
537536
kernel_manager_class = DottedObjectName(
538537
"jupyter_client.ioloop.AsyncIOLoopKernelManager",
539538
config=True,

jupyter_client/provisioning/local_provisioner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _tolerate_no_process(os_error: OSError) -> None:
127127
# In Windows, we will get an Access Denied error if the process
128128
# has already terminated. Ignore it.
129129
if sys.platform == 'win32':
130-
if os_error.winerror != 5: # noqa
130+
if os_error.winerror != 5:
131131
raise
132132
# On Unix, we may get an ESRCH error (or ProcessLookupError instance) if
133133
# the process has already terminated. Ignore it.

jupyter_client/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ def send(
835835
else:
836836
try:
837837
# check to see if buf supports the buffer protocol.
838-
view = memoryview(buf) # type:ignore[assignment]
838+
view = memoryview(buf)
839839
except TypeError as e:
840840
emsg = "Buffer objects must support the buffer protocol."
841841
raise TypeError(emsg) from e

jupyter_client/ssh/forward.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def handle(self):
8888

8989
def forward_tunnel(local_port, remote_host, remote_port, transport):
9090
"""Forward an ssh tunnel."""
91+
9192
# this is a little convoluted, but lets me configure things for the Handler
9293
# object. (SocketServer doesn't give Handlers any way to access the outer
9394
# server normally.)

jupyter_client/win_interrupt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def create_interrupt_event():
1616
this handle and use it with ``send_interrupt`` to interrupt the child
1717
process.
1818
"""
19+
1920
# Create a security attributes struct that permits inheritance of the
2021
# handle by new processes.
2122
# FIXME: We can clean up this mess by requiring pywin32 for IPython.

pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ test = "mypy --install-types --non-interactive {args:.}"
108108

109109
[tool.hatch.envs.lint]
110110
dependencies = [
111-
"black[jupyter]==22.12.0",
111+
"black[jupyter]==23.1.0",
112112
"mdformat>0.7",
113-
"ruff==0.0.236",
113+
"ruff==0.0.243",
114114
]
115115
[tool.hatch.envs.lint.scripts]
116116
style = [
@@ -196,7 +196,6 @@ select = [
196196
"N",
197197
"PLC",
198198
"PLE",
199-
"PLR",
200199
"PLW",
201200
"Q",
202201
"RUF",
@@ -239,6 +238,10 @@ ignore = [
239238
"N806",
240239
# SIM105 Use `contextlib.suppress(ValueError)` instead of try-except-pass
241240
"SIM105",
241+
# SIM108 [*] Use ternary operator
242+
"SIM108",
243+
# S110 `try`-`except`-`pass` detected, consider logging the exception
244+
"S110",
242245
]
243246
unfixable = [
244247
# Don't touch print statements

tests/test_connect.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,13 @@ def test_mixin_cleanup_random_ports():
247247

248248
@pytest.mark.parametrize("file_exists, km_matches", param_values)
249249
def test_reconcile_connection_info(file_exists, km_matches):
250-
251250
expected_info = sample_info
252251
mismatched_info = sample_info.copy()
253252
mismatched_info["key"] = b"def456"
254253
mismatched_info["shell_port"] = expected_info["shell_port"] + 42
255254
mismatched_info["control_port"] = expected_info["control_port"] + 42
256255

257256
with TemporaryDirectory() as connection_dir:
258-
259257
cf = os.path.join(connection_dir, "kernel.json")
260258
km = KernelManager()
261259
km.connection_file = cf

tests/test_kernelmanager.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ def test_get_connect_info(self, km):
195195

196196
@pytest.mark.skipif(sys.platform == "win32", reason="Windows doesn't support signals")
197197
async def test_signal_kernel_subprocesses(self, install_kernel, jp_start_kernel):
198-
199198
km, kc = await jp_start_kernel("signaltest")
200199

201200
async def execute(cmd):
@@ -448,7 +447,6 @@ async def test_get_connect_info(self, async_km):
448447
@pytest.mark.timeout(10)
449448
@pytest.mark.skipif(sys.platform == "win32", reason="Windows doesn't support signals")
450449
async def test_signal_kernel_subprocesses(self, install_kernel, jp_start_kernel):
451-
452450
km, kc = await jp_start_kernel("signaltest")
453451

454452
async def execute(cmd):

0 commit comments

Comments
 (0)