Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #3150

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.2
hooks:
- id: ruff
types: [file]
Expand Down
4 changes: 2 additions & 2 deletions notes-to-self/aio-guest-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def trio_main():
to_trio, from_aio = trio.open_memory_channel(float("inf"))
from_trio = asyncio.Queue()

_task_ref = asyncio.create_task(aio_pingpong(from_trio, to_trio))
task_ref = asyncio.create_task(aio_pingpong(from_trio, to_trio))

from_trio.put_nowait(0)

Expand All @@ -37,7 +37,7 @@ async def trio_main():
from_trio.put_nowait(n + 1)
if n >= 10:
return
del _task_ref
del task_ref


async def aio_pingpong(from_trio, to_trio):
Expand Down
4 changes: 2 additions & 2 deletions src/trio/_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ async def open_file(
:func:`trio.Path.open`

"""
_file = wrap_file(
file_ = wrap_file(
await trio.to_thread.run_sync(
io.open,
file,
Expand All @@ -480,7 +480,7 @@ async def open_file(
opener,
),
)
return _file
return file_


def wrap_file(file: FileT) -> AsyncIOWrapper[FileT]:
Expand Down
20 changes: 10 additions & 10 deletions src/trio/_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,26 +1283,26 @@ async def sendto(self, *args: object) -> int:
@_wraps(_stdlib_socket.socket.sendmsg, assigned=(), updated=())
async def sendmsg(
self,
__buffers: Iterable[Buffer],
__ancdata: Iterable[tuple[int, int, Buffer]] = (),
__flags: int = 0,
__address: AddressFormat | None = None,
buffers: Iterable[Buffer],
ancdata: Iterable[tuple[int, int, Buffer]] = (),
flags: int = 0,
address: AddressFormat | None = None,
jakkdl marked this conversation as resolved.
Show resolved Hide resolved
) -> int:
"""Similar to :meth:`socket.socket.sendmsg`, but async.

Only available on platforms where :meth:`socket.socket.sendmsg` is
available.

"""
if __address is not None:
__address = await self._resolve_address_nocp(__address, local=False)
if address is not None:
address = await self._resolve_address_nocp(address, local=False)
return await self._nonblocking_helper(
_core.wait_writable,
_stdlib_socket.socket.sendmsg,
__buffers,
__ancdata,
__flags,
__address,
buffers,
ancdata,
flags,
address,
)

################################################################
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pytest==8.3.3
# via -r test-requirements.in
requests==2.32.3
# via sphinx
ruff==0.8.1
ruff==0.8.2
# via -r test-requirements.in
sniffio==1.3.1
# via -r test-requirements.in
Expand Down
Loading