Skip to content

Commit e7a0fde

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b340c2d commit e7a0fde

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

Diff for: ipykernel/kernelbase.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,9 @@ async def start(self, *, task_status: TaskStatus = TASK_STATUS_IGNORED) -> None:
552552
# Assign tasks to and start shell channel thread.
553553
manager = self.shell_channel_thread.manager
554554
self.shell_channel_thread.add_task(self.shell_channel_thread_main)
555-
self.shell_channel_thread.add_task(manager.listen_from_control, self.shell_main, self.shell_channel_thread)
555+
self.shell_channel_thread.add_task(
556+
manager.listen_from_control, self.shell_main, self.shell_channel_thread
557+
)
556558
self.shell_channel_thread.add_task(manager.listen_from_subshells)
557559
self.shell_channel_thread.start()
558560
else:
@@ -1082,7 +1084,9 @@ async def create_subshell_request(self, socket, ident, parent) -> None:
10821084

10831085
# This should only be called in the control thread if it exists.
10841086
# Request is passed to shell channel thread to process.
1085-
other_socket = await self.shell_channel_thread.manager.get_control_other_socket(self.control_thread.get_task_group())
1087+
other_socket = await self.shell_channel_thread.manager.get_control_other_socket(
1088+
self.control_thread.get_task_group()
1089+
)
10861090
await other_socket.asend_json({"type": "create"})
10871091
reply = await other_socket.arecv_json()
10881092

@@ -1104,7 +1108,9 @@ async def delete_subshell_request(self, socket, ident, parent) -> None:
11041108

11051109
# This should only be called in the control thread if it exists.
11061110
# Request is passed to shell channel thread to process.
1107-
other_socket = await self.shell_channel_thread.manager.get_control_other_socket(self.control_thread.get_task_group())
1111+
other_socket = await self.shell_channel_thread.manager.get_control_other_socket(
1112+
self.control_thread.get_task_group()
1113+
)
11081114
await other_socket.asend_json({"type": "delete", "subshell_id": subshell_id})
11091115
reply = await other_socket.arecv_json()
11101116

@@ -1119,7 +1125,9 @@ async def list_subshell_request(self, socket, ident, parent) -> None:
11191125

11201126
# This should only be called in the control thread if it exists.
11211127
# Request is passed to shell channel thread to process.
1122-
other_socket = await self.shell_channel_thread.manager.get_control_other_socket(self.control_thread.get_task_group())
1128+
other_socket = await self.shell_channel_thread.manager.get_control_other_socket(
1129+
self.control_thread.get_task_group()
1130+
)
11231131
await other_socket.asend_json({"type": "list"})
11241132
reply = await other_socket.arecv_json()
11251133

Diff for: ipykernel/subshell_manager.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ def _is_subshell(self, subshell_id: str | None) -> bool:
234234
with self._lock_cache:
235235
return subshell_id in self._cache
236236

237-
async def _listen_for_subshell_reply(self, subshell_id: str | None, task_group: TaskGroup) -> None:
237+
async def _listen_for_subshell_reply(
238+
self, subshell_id: str | None, task_group: TaskGroup
239+
) -> None:
238240
"""Listen for reply messages on specified subshell inproc socket and
239241
resend to the client via the shell_socket.
240242

Diff for: tests/conftest.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
resource = None # type:ignore
2323

2424

25-
@pytest.fixture
25+
@pytest.fixture()
2626
def anyio_backend():
2727
return "asyncio"
2828

29+
2930
pytestmark = pytest.mark.anyio
3031

3132

Diff for: tests/test_io.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ async def subprocess_test_echo_watch():
197197

198198

199199
@pytest.mark.anyio()
200-
#@pytest.mark.skipif(sys.platform.startswith("win"), reason="Windows")
200+
# @pytest.mark.skipif(sys.platform.startswith("win"), reason="Windows")
201201
@pytest.mark.skip(reason="FIXME")
202202
async def test_echo_watch(ctx):
203203
"""Test echo on underlying FD while capturing the same FD

0 commit comments

Comments
 (0)