Commit d0e2153d authored by Tom Niget's avatar Tom Niget

bug: fix handling of parameter type hints

parent 3397afd1
...@@ -41,7 +41,7 @@ def rpc(f): ...@@ -41,7 +41,7 @@ def rpc(f):
argspec = inspect.getfullargspec(f) argspec = inspect.getfullargspec(f)
assert not (argspec.varargs or argspec.varkw), f assert not (argspec.varargs or argspec.varkw), f
sig = inspect.signature(f) sig = inspect.signature(f)
sig = sig.replace(parameters=[*sig.parameters.values()][1:], return_annotation=inspect.Signature.empty) sig = sig.replace(parameters=[v.replace(annotation=inspect.Parameter.empty) for v in sig.parameters.values()][1:], return_annotation=inspect.Signature.empty)
f.getcallargs = eval("lambda %s: locals()" % str(sig)[1:-1]) f.getcallargs = eval("lambda %s: locals()" % str(sig)[1:-1])
return f return f
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment