Skip to content

Commit 3523c65

Browse files
pre-commit-ci[bot]shaypal5
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c6fbdcd commit 3523c65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cachier/core.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,11 @@ def _call(*args, max_age: Optional[timedelta] = None, **kwds):
259259
if _allow_none or entry.value is not None:
260260
_print("Cached result found.")
261261
now = datetime.now()
262-
stale_delta = min(_stale_after, max_age) if max_age is not None else _stale_after
262+
stale_delta = (
263+
min(_stale_after, max_age)
264+
if max_age is not None
265+
else _stale_after
266+
)
263267
if now - entry.time <= stale_delta:
264268
_print("And it is fresh!")
265269
return entry.value

0 commit comments

Comments
 (0)