Command signature inspection fix (#6029) (#6032)

This commit is contained in:
Michał Wesołowski 2023-03-29 13:13:54 +02:00 committed by GitHub
parent 8757757892
commit 04d9249ab1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ from mitmproxy.command_lexer import unquote
def verify_arg_signature(f: Callable, args: Iterable[Any], kwargs: dict) -> None:
sig = inspect.signature(f)
sig = inspect.signature(f, eval_str=True)
try:
sig.bind(*args, **kwargs)
except TypeError as v:
@ -71,7 +71,7 @@ class Command:
self.name = name
self.manager = manager
self.func = func
self.signature = inspect.signature(self.func)
self.signature = inspect.signature(self.func, eval_str=True)
if func.__doc__:
txt = func.__doc__.strip()