Skip to content

Commit f65617b

Browse files
authored
Merge pull request #116 from modal-labs/ekzhang/infinite-len
Check if instance is not None instead of truthiness
2 parents 6faab74 + 556a6f2 commit f65617b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

synchronicity/combined_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, func, aio_func, synchronizer: "Synchronizer", is_classmethod=
3939
self._is_classmethod = is_classmethod
4040

4141
def __get__(self, instance, owner=None):
42-
bind_var = instance if instance and not self._is_classmethod else owner
42+
bind_var = instance if instance is not None and not self._is_classmethod else owner
4343

4444
bound_func = functools.wraps(self._func)(functools.partial(self._func, bind_var)) # bound blocking function
4545
self._synchronizer._update_wrapper(bound_func, self._func, interface=Interface.BLOCKING)

0 commit comments

Comments
 (0)