Skip to content

Commit

Permalink
Fix bug in return of method wrapped
Browse files Browse the repository at this point in the history
  • Loading branch information
nycholas committed Nov 15, 2022
1 parent 9c91e81 commit 8628023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flask_jsonrpc/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _method_has_parameters(self, fn: t.Callable[..., t.Any]) -> bool:

def _method_has_return(self, fn: t.Callable[..., t.Any]) -> bool:
fn_annotations = t.get_type_hints(fn)
return 'return' in fn_annotations and fn_annotations['return'] is not type(None)
return 'return' in fn_annotations and fn_annotations['return'] is not type(None) # noqa: E721

def _validate(self, fn: t.Callable[..., t.Any]) -> bool:
if not self._method_has_parameters(fn) and not self._method_has_return(fn):
Expand Down

0 comments on commit 8628023

Please sign in to comment.