Skip to content

Commit

Permalink
some more types
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed Sep 5, 2022
1 parent db07de3 commit f10b558
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/whitenoise/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
mimetypes: dict[str, str] | None = None,
add_headers_function: Callable[[Headers, str, str], None] | None = None,
index_file: str | bool | None = None,
immutable_file_test: Callable | str | None = None,
immutable_file_test: Callable[[str, str], bool] | str | None = None,
):
self.autorefresh = autorefresh
self.max_age = max_age
Expand Down
2 changes: 1 addition & 1 deletion src/whitenoise/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def serve(static_file, request):
http_response[key] = value
return http_response

def add_files_from_finders(self):
def add_files_from_finders(self) -> None:
files = {}
for finder in finders.get_finders():
for path, storage in finder.list(None):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class TriggerException(HashedFilesMixin):
def exists(self, path):
return False

exception = None
exception: ValueError
try:
TriggerException().hashed_name("/missing/file.png")
except ValueError as e:
Expand Down

0 comments on commit f10b558

Please sign in to comment.