Skip to content

Commit 7a3fa38

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 68a6772 commit 7a3fa38

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/cachier/core.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,7 @@ def _cachier_decorator(func):
369369
# explicitly opted in. The 'self' parameter is ignored for cache-key
370370
# computation, so all instances share the same cache.
371371
if core.func_is_method:
372-
_allow_methods = _update_with_defaults(
373-
allow_non_static_methods, "allow_non_static_methods"
374-
)
372+
_allow_methods = _update_with_defaults(allow_non_static_methods, "allow_non_static_methods")
375373
if not _allow_methods:
376374
raise TypeError(
377375
f"@cachier cannot decorate instance method "

tests/test_smoke.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def test_classmethod_not_guarded():
177177
Note: The decorator order must be @classmethod first, then @cachier,
178178
so that cachier sees the underlying function (whose first param is
179179
``cls``, not ``self``) and the guard is not triggered.
180+
180181
"""
181182

182183
# A custom hash_func is needed because the default pickle-based

0 commit comments

Comments
 (0)