Skip to content

Commit

Permalink
chore: minor reformat to T_ON_SET_CALLBACK docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
dgilland committed Nov 17, 2023
1 parent 7b5cea8 commit 1e653b9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/cacheout/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@
#: the default), and `exists` is whether the cache key exists or not.
T_ON_GET_CALLBACK = t.Optional[t.Callable[[t.Hashable, t.Any, bool], None]]

#: Callback that will be executed when a cache entry is set.

#: It is called with arguments ``(key, new_value, old_value)`` where `key` is the cache key,
#: `new_value` is the value is set,
#: and `old_value` is the value is replaced(if the key didn't exist before, it's ``UNSET``).
#: Callback that will be executed when a cache entry is set. It is called with arguments
#: ``(key, new_value, old_value)`` where `key` is the cache key, `new_value` is the value is set,
#: and `old_value` is the value it replaced (if the key didn't exist before, it's :const:`UNSET`).
T_ON_SET_CALLBACK = t.Optional[t.Callable[[t.Hashable, t.Any, t.Any], None]]

#: Callback that will be executed when a cache entry is removed. It is called with arguments
Expand Down

0 comments on commit 1e653b9

Please sign in to comment.