Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Apr 28, 2024
1 parent f1f8914 commit 6ad04f7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions cachecontrol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Make it easy to import from cachecontrol without long namespaces.
"""

__author__ = "Eric Larson"
__email__ = "[email protected]"
__version__ = "0.14.0"
Expand Down
1 change: 1 addition & 0 deletions cachecontrol/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
The cache object API for implementing caches. The default is a thread
safe in-memory dictionary.
"""

from __future__ import annotations

from threading import Lock
Expand Down
1 change: 1 addition & 0 deletions cachecontrol/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
The httplib2 algorithms ported for use with requests.
"""

from __future__ import annotations

import calendar
Expand Down
4 changes: 3 additions & 1 deletion cachecontrol/heuristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def update_headers(self, response: HTTPResponse) -> dict[str, str]:

if "expires" not in response.headers:
date = parsedate(response.headers["date"])
expires = expire_after(timedelta(days=1), date=datetime(*date[:6], tzinfo=timezone.utc)) # type: ignore[index,misc]
expires = expire_after(
timedelta(days=1), date=datetime(*date[:6], tzinfo=timezone.utc)
) # type: ignore[index,misc]
headers["expires"] = datetime_to_header(expires)
headers["cache-control"] = "public"
return headers
Expand Down
1 change: 1 addition & 0 deletions tests/test_cache_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
Unit tests that verify our caching methods work correctly.
"""

import time
from tempfile import mkdtemp
from unittest.mock import ANY, Mock
Expand Down
1 change: 1 addition & 0 deletions tests/test_redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
Test for supporting redirect caches as needed.
"""

import requests

from cachecontrol import CacheControl
Expand Down
1 change: 1 addition & 0 deletions tests/test_storage_filecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
Unit tests that verify FileCache storage works correctly.
"""

import os
import string

Expand Down

0 comments on commit 6ad04f7

Please sign in to comment.