diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0f9c390..7b89f18c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,34 +1,34 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v2.9.0 + rev: v3.3.1 hooks: - id: pyupgrade args: ["--py37-plus"] - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 22.12.0 hooks: - id: black args: ["--target-version=py37"] - repo: https://github.com/pycqa/isort - rev: 5.7.0 + rev: 5.11.2 hooks: - id: isort args: ["--profile=black"] - repo: https://github.com/pycqa/flake8 - rev: 3.8.4 + rev: 6.0.0 hooks: - id: flake8 - repo: https://github.com/asottile/yesqa - rev: v1.2.2 + rev: v1.4.0 hooks: - id: yesqa - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.4.0 hooks: - id: check-merge-conflict - id: check-toml diff --git a/asgiref/timeout.py b/asgiref/timeout.py index 65932d17..46cdc798 100644 --- a/asgiref/timeout.py +++ b/asgiref/timeout.py @@ -8,7 +8,8 @@ import asyncio from types import TracebackType -from typing import Any, Optional, Type +from typing import Any # noqa +from typing import Optional, Type class timeout: diff --git a/tests/test_server.py b/tests/test_server.py index 616ccf21..65f80043 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -61,10 +61,10 @@ def __init__(self, name): async def register(self, server_addr, name=None): name = name or self.name - self._sock.sendto(f"Register {name}".encode("utf-8"), server_addr) + self._sock.sendto(f"Register {name}".encode(), server_addr) async def send(self, server_addr, to, msg): - self._sock.sendto(f"To {to} {msg}".encode("utf-8"), server_addr) + self._sock.sendto(f"To {to} {msg}".encode(), server_addr) async def get_msg(self): msg, server_addr = await sock_recvfrom(self._sock, 4096)