Skip to content

Commit a38f7f6

Browse files
committed
Fix more remnants of old that got removed
1 parent 924b6dd commit a38f7f6

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/trio/_core/_tests/test_mock_clock.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ async def test_mock_clock_autojump_interference(mock_clock: MockClock) -> None:
110110
await wait_all_tasks_blocked(0.015)
111111

112112
# but the 0.02 limit does apply
113-
await sleep(100000) # noqa: ASYNC116 # not sleep_forever
113+
# ignore ASYNC116, not sleep_forever, trying to test a large but finite sleep
114+
await sleep(100000) # noqa: ASYNC116
114115

115116

116117
def test_mock_clock_autojump_preset() -> None:

src/trio/_tests/test_ssl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,8 @@ async def sleep_then_wait_writable() -> None:
732732

733733
async def sleeper_with_slow_wait_writable_and_expect(method: str) -> None:
734734
if method == "wait_send_all_might_not_block":
735-
await trio.sleep(100000) # noqa: ASYNC116 # not sleep forever
735+
# ignore ASYNC116, not sleep_forever, trying to test a large but finite sleep
736+
await trio.sleep(100000) # noqa: ASYNC116
736737
elif method == "expect":
737738
await trio.sleep(1000)
738739

src/trio/_tests/test_threads.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,6 @@ def thread_fn() -> tuple[str, str, str, str, str]:
822822
with pytest.raises(sniffio.AsyncLibraryNotFoundError):
823823
sniffio.current_async_library()
824824

825-
# Missing await
826825
async def async_back_in_main() -> tuple[str, str]:
827826
back_parent_value = trio_test_contextvar.get()
828827
trio_test_contextvar.set("back_in_main")
@@ -864,7 +863,6 @@ def test_run_fn_as_system_task_catched_badly_typed_token() -> None:
864863
)
865864

866865

867-
# Missing await
868866
async def test_from_thread_inside_trio_thread() -> None:
869867
def not_called() -> None: # pragma: no cover
870868
raise AssertionError()
@@ -901,7 +899,6 @@ async def main(use_system_task: bool) -> None:
901899
assert record == ["finished", "clean"]
902900

903901

904-
# Missing await
905902
async def test_trio_token_weak_referenceable() -> None:
906903
token = _core.current_trio_token()
907904
assert isinstance(token, _core.TrioToken)

src/trio/testing/_memory_streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def pump_from_send_stream_to_recv_stream() -> None:
348348
memory_stream_pump(send_stream, recv_stream)
349349

350350
# await not used
351-
async def async_pump_from_send_stream_to_recv_stream() -> None: # noqa
351+
async def async_pump_from_send_stream_to_recv_stream() -> None: # noqa: RUF029
352352
pump_from_send_stream_to_recv_stream()
353353

354354
send_stream.send_all_hook = async_pump_from_send_stream_to_recv_stream

0 commit comments

Comments
 (0)