Skip to content

Commit

Permalink
Merge pull request #131 from daikeren/master
Browse files Browse the repository at this point in the history
Fix Route.is_function
  • Loading branch information
kennethreitz committed Oct 23, 2018
2 parents a1564ca + 071d34b commit 886cc0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ coverage.xml

__pycache__
tests/__pycache__

*.pyc
build
responder.egg-info/
dist/
Expand Down
4 changes: 2 additions & 2 deletions responder/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def is_class_based(self):

@property
def is_function(self):
routed = hasattr(self.endpoint, "is_routed")
is_callable = callable(self.endpoint)
code = hasattr(self.endpoint, "__code__")
kwdefaults = hasattr(self.endpoint, "__kwdefaults__")
return all((routed, code, kwdefaults))
return all((is_callable, code, kwdefaults))

0 comments on commit 886cc0f

Please sign in to comment.