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 #2924

Merged
merged 3 commits into from
Jan 16, 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 @@ -23,7 +23,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
rev: v0.1.13
hooks:
- id: ruff
types: [file]
Expand Down
9 changes: 0 additions & 9 deletions src/trio/_core/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@

PosArgT = TypeVarTuple("PosArgT")

# Needs to be guarded, since Unpack[] would be evaluated at runtime.
class _NurseryStartFunc(Protocol[Unpack[PosArgT], StatusT_co]):
"""Type of functions passed to `nursery.start() <trio.Nursery.start>`."""

def __call__(
self, *args: Unpack[PosArgT], task_status: TaskStatus[StatusT_co]
) -> Awaitable[object]:
...


DEADLINE_HEAP_MIN_PRUNE_THRESHOLD: Final = 1000

Expand Down
10 changes: 5 additions & 5 deletions src/trio/_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def recv(__self, __buflen: int, __flags: int = 0) -> Awaitable[bytes]:
# _make_simple_sock_method_wrapper is typed, so this checks that the above is correct
# this requires that we refrain from using `/` to specify pos-only
# args, or mypy thinks the signature differs from typeshed.
recv = _make_simple_sock_method_wrapper( # noqa: F811
recv = _make_simple_sock_method_wrapper(
_stdlib_socket.socket.recv, _core.wait_readable
)

Expand All @@ -1076,7 +1076,7 @@ def recv_into(
) -> Awaitable[int]:
...

recv_into = _make_simple_sock_method_wrapper( # noqa: F811
recv_into = _make_simple_sock_method_wrapper(
_stdlib_socket.socket.recv_into, _core.wait_readable
)

Expand All @@ -1091,7 +1091,7 @@ def recvfrom(
) -> Awaitable[tuple[bytes, AddressFormat]]:
...

recvfrom = _make_simple_sock_method_wrapper( # noqa: F811
recvfrom = _make_simple_sock_method_wrapper(
_stdlib_socket.socket.recvfrom, _core.wait_readable
)

Expand All @@ -1106,7 +1106,7 @@ def recvfrom_into(
) -> Awaitable[tuple[int, AddressFormat]]:
...

recvfrom_into = _make_simple_sock_method_wrapper( # noqa: F811
recvfrom_into = _make_simple_sock_method_wrapper(
_stdlib_socket.socket.recvfrom_into, _core.wait_readable
)

Expand Down Expand Up @@ -1158,7 +1158,7 @@ def recvmsg_into(
def send(__self, __bytes: Buffer, __flags: int = 0) -> Awaitable[int]:
...

send = _make_simple_sock_method_wrapper( # noqa: F811
send = _make_simple_sock_method_wrapper(
_stdlib_socket.socket.send, _core.wait_writable
)

Expand Down
6 changes: 3 additions & 3 deletions src/trio/_subprocess_platform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

try:
if sys.platform == "win32":
from .windows import wait_child_exiting # noqa: F811
from .windows import wait_child_exiting

Check warning on line 73 in src/trio/_subprocess_platform/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/trio/_subprocess_platform/__init__.py#L73

Added line #L73 was not covered by tests
elif sys.platform != "linux" and (TYPE_CHECKING or hasattr(_core, "wait_kevent")):
from .kqueue import wait_child_exiting
else:
Expand All @@ -86,11 +86,11 @@

elif os.name == "posix":

def create_pipe_to_child_stdin(): # noqa: F811
def create_pipe_to_child_stdin():
rfd, wfd = os.pipe()
return trio.lowlevel.FdStream(wfd), rfd

def create_pipe_from_child_output(): # noqa: F811
def create_pipe_from_child_output():
rfd, wfd = os.pipe()
return trio.lowlevel.FdStream(rfd), wfd

Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pytz==2023.3.post1
# via babel
requests==2.31.0
# via sphinx
ruff==0.1.9
ruff==0.1.13
# via -r test-requirements.in
sniffio==1.3.0
# via -r test-requirements.in
Expand Down