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 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(