Skip to content

Commit 10f69c9

Browse files
[pre-commit.ci] pre-commit autoupdate (#880)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v3.2.0 → v3.2.2](asottile/pyupgrade@v3.2.0...v3.2.2) - [github.com/pre-commit/mirrors-mypy: v0.982 → v0.990](pre-commit/mirrors-mypy@v0.982...v0.990) - [github.com/sirosen/check-jsonschema: 0.18.4 → 0.19.1](python-jsonschema/check-jsonschema@0.18.4...0.19.1) * lint * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * lint * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
1 parent a21dd92 commit 10f69c9

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repos:
3838
- id: mdformat
3939

4040
- repo: https://github.com/asottile/pyupgrade
41-
rev: v3.2.0
41+
rev: v3.2.2
4242
hooks:
4343
- id: pyupgrade
4444
args: [--py38-plus]
@@ -60,7 +60,7 @@ repos:
6060
stages: [manual]
6161

6262
- repo: https://github.com/pre-commit/mirrors-mypy
63-
rev: v0.982
63+
rev: v0.990
6464
hooks:
6565
- id: mypy
6666
exclude: tests
@@ -75,7 +75,7 @@ repos:
7575
args: [--max-line-length=100]
7676

7777
- repo: https://github.com/sirosen/check-jsonschema
78-
rev: 0.18.4
78+
rev: 0.19.1
7979
hooks:
8080
- id: check-jsonschema
8181
name: "Check GitHub Workflows"

jupyter_client/multikernelmanager.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ async def _async_restart_kernel(self, kernel_id: str, now: bool = False) -> None
381381
restart_kernel = run_sync(_async_restart_kernel)
382382

383383
@kernel_method
384-
def is_alive(self, kernel_id: str) -> bool:
384+
def is_alive(self, kernel_id: str) -> bool: # type:ignore[empty-body]
385385
"""Is the kernel alive.
386386
387387
This calls KernelManager.is_alive() which calls Popen.poll on the
@@ -422,7 +422,7 @@ def remove_restart_callback(
422422
"""remove a callback for the KernelRestarter"""
423423

424424
@kernel_method
425-
def get_connection_info(self, kernel_id: str) -> t.Dict[str, t.Any]:
425+
def get_connection_info(self, kernel_id: str) -> t.Dict[str, t.Any]: # type:ignore[empty-body]
426426
"""Return a dictionary of connection data for a kernel.
427427
428428
Parameters
@@ -440,7 +440,9 @@ def get_connection_info(self, kernel_id: str) -> t.Dict[str, t.Any]:
440440
"""
441441

442442
@kernel_method
443-
def connect_iopub(self, kernel_id: str, identity: t.Optional[bytes] = None) -> socket.socket:
443+
def connect_iopub( # type:ignore[empty-body]
444+
self, kernel_id: str, identity: t.Optional[bytes] = None
445+
) -> socket.socket:
444446
"""Return a zmq Socket connected to the iopub channel.
445447
446448
Parameters
@@ -456,7 +458,9 @@ def connect_iopub(self, kernel_id: str, identity: t.Optional[bytes] = None) -> s
456458
"""
457459

458460
@kernel_method
459-
def connect_shell(self, kernel_id: str, identity: t.Optional[bytes] = None) -> socket.socket:
461+
def connect_shell( # type:ignore[empty-body]
462+
self, kernel_id: str, identity: t.Optional[bytes] = None
463+
) -> socket.socket:
460464
"""Return a zmq Socket connected to the shell channel.
461465
462466
Parameters
@@ -472,7 +476,9 @@ def connect_shell(self, kernel_id: str, identity: t.Optional[bytes] = None) -> s
472476
"""
473477

474478
@kernel_method
475-
def connect_control(self, kernel_id: str, identity: t.Optional[bytes] = None) -> socket.socket:
479+
def connect_control( # type:ignore[empty-body]
480+
self, kernel_id: str, identity: t.Optional[bytes] = None
481+
) -> socket.socket:
476482
"""Return a zmq Socket connected to the control channel.
477483
478484
Parameters
@@ -488,7 +494,9 @@ def connect_control(self, kernel_id: str, identity: t.Optional[bytes] = None) ->
488494
"""
489495

490496
@kernel_method
491-
def connect_stdin(self, kernel_id: str, identity: t.Optional[bytes] = None) -> socket.socket:
497+
def connect_stdin( # type:ignore[empty-body]
498+
self, kernel_id: str, identity: t.Optional[bytes] = None
499+
) -> socket.socket:
492500
"""Return a zmq Socket connected to the stdin channel.
493501
494502
Parameters
@@ -504,7 +512,9 @@ def connect_stdin(self, kernel_id: str, identity: t.Optional[bytes] = None) -> s
504512
"""
505513

506514
@kernel_method
507-
def connect_hb(self, kernel_id: str, identity: t.Optional[bytes] = None) -> socket.socket:
515+
def connect_hb( # type:ignore[empty-body]
516+
self, kernel_id: str, identity: t.Optional[bytes] = None
517+
) -> socket.socket:
508518
"""Return a zmq Socket connected to the hb channel.
509519
510520
Parameters

jupyter_client/provisioning/local_provisioner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from .provisioner_base import KernelProvisionerBase
1919

2020

21-
class LocalProvisioner(KernelProvisionerBase):
21+
class LocalProvisioner(KernelProvisionerBase): # type:ignore[misc]
2222
"""
2323
:class:`LocalProvisioner` is a concrete class of ABC :py:class:`KernelProvisionerBase`
2424
and is the out-of-box default implementation used when no kernel provisioner is

jupyter_client/session.py

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

0 commit comments

Comments
 (0)