Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2023
1 parent 876148e commit 11baa4f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
12 changes: 6 additions & 6 deletions ipykernel/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ def __init__(self, event_callback, log):
self.tcp_buffer = ""
self._reset_tcp_pos()
self.event_callback = event_callback
self.message_send_stream, self.message_receive_stream = create_memory_object_stream[dict[str, Any]](
max_buffer_size=inf
)
self.message_send_stream, self.message_receive_stream = create_memory_object_stream[
dict[str, Any]
](max_buffer_size=inf)
self.log = log

def _reset_tcp_pos(self):
Expand Down Expand Up @@ -343,9 +343,9 @@ def __init__(
self.is_started = False
self.event_callback = event_callback
self.just_my_code = just_my_code
self.stopped_send_stream, self.stopped_receive_stream = create_memory_object_stream[dict[str, Any]](
max_buffer_size=inf
)
self.stopped_send_stream, self.stopped_receive_stream = create_memory_object_stream[
dict[str, Any]
](max_buffer_size=inf)

self.started_debug_handlers = {}
for msg_type in Debugger.started_debug_msg_types:
Expand Down
7 changes: 6 additions & 1 deletion ipykernel/inprocess/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ def shutdown_kernel(self):
self._kill_kernel()

async def restart_kernel( # type: ignore[explicit-override, override]
self, now: bool = False, newports: bool = False, *, task_status: TaskStatus = TASK_STATUS_IGNORED, **kw: Any
self,
now: bool = False,
newports: bool = False,
*,
task_status: TaskStatus = TASK_STATUS_IGNORED,
**kw: Any,
) -> None:
"""Restart the kernel."""
self.shutdown_kernel()
Expand Down
12 changes: 6 additions & 6 deletions ipykernel/inprocess/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ def __init__(self, is_shell, *args, **kwargs):
self.is_shell = is_shell
self.on_recv = None
if is_shell:
self.in_send_stream, self.in_receive_stream = create_memory_object_stream[dict[str, Any]](
max_buffer_size=inf
)
self.out_send_stream, self.out_receive_stream = create_memory_object_stream[dict[str, Any]](
max_buffer_size=inf
)
self.in_send_stream, self.in_receive_stream = create_memory_object_stream[
dict[str, Any]
](max_buffer_size=inf)
self.out_send_stream, self.out_receive_stream = create_memory_object_stream[
dict[str, Any]
](max_buffer_size=inf)

def put(self, msg):
self.in_send_stream.send_nowait(msg)
Expand Down

0 comments on commit 11baa4f

Please sign in to comment.