Skip to content

Commit e402614

Browse files
Daniel-Chinshaypal5
authored andcommitted
fix type
1 parent afb3390 commit e402614

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cachier/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def cachier(
214214
def _cachier_decorator(func):
215215
core.set_func(func)
216216

217-
def _call(max_age: timedelta | None, *args, **kwds):
217+
def _call(max_age: timedelta, *args, **kwds):
218218
nonlocal allow_none
219219
_allow_none = _update_with_defaults(allow_none, "allow_none", kwds)
220220
# print('Inside general wrapper for {}.'.format(func.__name__))
@@ -293,7 +293,7 @@ def _call(max_age: timedelta | None, *args, **kwds):
293293
_print("No entry found. No current calc. Calling like a boss.")
294294
return _calc_entry(core, key, func, args, kwds)
295295

296-
func_wrapper = wraps(func)(partial(_call, None))
296+
func_wrapper = wraps(func)(partial(_call, timedelta.max))
297297

298298
def _clear_cache():
299299
"""Clear the cache."""

0 commit comments

Comments
 (0)