Skip to content

Commit

Permalink
Merge pull request #3 from ken-morel/dev
Browse files Browse the repository at this point in the history
Corected minor mistake, to use failback
  • Loading branch information
ken-morel authored Jul 26, 2024
2 parents bb728fa + 1fac70b commit b72880a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/comberload.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def fallback_get_input():
"""

__version__ = "1.1.0"
__version__ = "1.1.1"
worker_running = False
should_work = True
backlog = []
Expand Down Expand Up @@ -73,9 +73,10 @@ def call(self, *args, **kw):
The default call for comberloaded instance, calla the
fallback if given, else returns None
"""
if self._fallback is None:
handle = (self._fallback or self._fallback)
if handle is None:
return None
return self._fallback(*args, **kw)
return handle(*args, **kw)

def fallback(self, func: Callable):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_comberload.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def test_comberload():
import comberload

assert comberload.__version__ == "1.1.0"
assert comberload.__version__ == "1.1.1"

@comberload("sys")
def foo():
Expand Down

0 comments on commit b72880a

Please sign in to comment.