From 34be83895aa3560f1f6ec5df6ce01cded68291fb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 19:06:38 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.20.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.20.0...v3.21.2) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 25.1.0 → 26.3.1](https://github.com/psf/black-pre-commit-mirror/compare/25.1.0...26.3.1) - [github.com/pycqa/isort: 6.0.1 → 8.0.1](https://github.com/pycqa/isort/compare/6.0.1...8.0.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89a3f438..a0075dc0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,16 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.20.0 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py39-plus] - - repo: https://github.com/psf/black - rev: 25.1.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.3.1 hooks: - id: black language_version: python3 - repo: https://github.com/pycqa/isort - rev: 6.0.1 + rev: 8.0.1 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 From 6c4bcafc87fc3e4411a2d5dd7fd05a9d2981578c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 19:08:46 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- daphne/http_protocol.py | 7 +------ daphne/server.py | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index e9eba960..33441ad6 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -41,12 +41,7 @@ class WebRequest(http.Request): - """.replace( - "\n", "" - ) - .replace(" ", " ") - .replace(" ", " ") - .replace(" ", " ") + """.replace("\n", "").replace(" ", " ").replace(" ", " ").replace(" ", " ") ) # Shorten it a bit, bytes wise def __init__(self, *args, **kwargs): diff --git a/daphne/server.py b/daphne/server.py index a6d38198..1d3f6d8c 100755 --- a/daphne/server.py +++ b/daphne/server.py @@ -6,7 +6,6 @@ from concurrent.futures import ThreadPoolExecutor # isort:skip from twisted.internet import asyncioreactor # isort:skip - twisted_loop = asyncio.new_event_loop() if "ASGI_THREADS" in os.environ: twisted_loop.set_default_executor(