Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 21, 2023
1 parent 2a386cc commit 06a874f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 3 additions & 7 deletions src/whitenoise/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,11 @@ def __init__(
self.add_files(root, prefix)

def __call__(self, *args, **kwargs):
raise NotImplementedError(
"Subclasses must implement `__call__`"
)

raise NotImplementedError("Subclasses must implement `__call__`")

@staticmethod
def serve(*args, **kwargs):
raise NotImplementedError(
"Subclasses must implement `serve`"
)
raise NotImplementedError("Subclasses must implement `serve`")

def add_files(self, root, prefix=None):
root = os.path.abspath(root)
Expand Down
6 changes: 4 additions & 2 deletions src/whitenoise/middleware.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
from __future__ import annotations

import asyncio
import os
from posixpath import basename
from urllib.parse import urlparse

import aiofiles
from asgiref.sync import async_to_sync
from asgiref.sync import iscoroutinefunction
from asgiref.sync import markcoroutinefunction
from django.conf import settings
from django.contrib.staticfiles import finders
from django.contrib.staticfiles.storage import staticfiles_storage
from django.http import FileResponse
from django.urls import get_script_prefix
from asgiref.sync import iscoroutinefunction, markcoroutinefunction

from .asgi import DEFAULT_BLOCK_SIZE
from .responders import StaticFile
from .string_utils import ensure_leading_trailing_slash
from .wsgi import WhiteNoise
import asyncio

__all__ = ["WhiteNoiseMiddleware"]

Expand Down

0 comments on commit 06a874f

Please sign in to comment.