diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 371134ae55..c1bf9a6832 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.4 + rev: v0.9.6 hooks: - id: ruff types: [file] @@ -43,7 +43,7 @@ repos: hooks: - id: sphinx-lint - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.3.0 + rev: v1.3.1 hooks: - id: zizmor - repo: local @@ -56,7 +56,7 @@ repos: additional_dependencies: ["astor", "attrs", "black", "ruff"] files: ^src\/trio\/_core\/(_run|(_i(o_(common|epoll|kqueue|windows)|nstrumentation)))\.py$ - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.5.26 + rev: 0.5.29 hooks: # Compile requirements - id: pip-compile diff --git a/src/trio/testing/_fake_net.py b/src/trio/testing/_fake_net.py index 2f5bd624ae..a78ba9a172 100644 --- a/src/trio/testing/_fake_net.py +++ b/src/trio/testing/_fake_net.py @@ -18,7 +18,6 @@ TYPE_CHECKING, Any, NoReturn, - TypeVar, Union, overload, ) @@ -82,9 +81,6 @@ def _scatter(data: bytes, buffers: Iterable[Buffer]) -> int: return written -T_UDPEndpoint = TypeVar("T_UDPEndpoint", bound="UDPEndpoint") - - @attrs.frozen class UDPEndpoint: ip: IPAddress @@ -101,9 +97,9 @@ def as_python_sockaddr(self) -> tuple[str, int] | tuple[str, int, int, int]: @classmethod def from_python_sockaddr( - cls: type[T_UDPEndpoint], + cls, sockaddr: tuple[str, int] | tuple[str, int, int, int], - ) -> T_UDPEndpoint: + ) -> UDPEndpoint: ip, port = sockaddr[:2] return cls(ip=ipaddress.ip_address(ip), port=port)