Skip to content

Commit 7ec27a1

Browse files
committed
use dir instead of vars to get inherited methods as well when decorating
1 parent aaf4767 commit 7ec27a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_valkey/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
def decorate_all_methods(decorator):
3434
def decorate(cls):
35-
for attr in vars(cls):
35+
for attr in dir(cls):
3636
# dunders and `get` should not be decorated
3737
# get is handled by `_get`
3838
if attr.startswith("__") or attr in {"get", "get_or_set"}:

0 commit comments

Comments
 (0)