I think instead of copying signature and annotation to the trampoline function (see #464 ), we should construct a trampoline with an identical signature. This should be more robust than trying to copy.
For instance, for a method like this:
def get_len(foo: int, bar: str):
return ...
we currently create a trampoline like this:
def get_len(*args, **kwargs):
result = _mutmut_trampoline(x_get_len__mutmut_orig, x_get_len__mutmut_mutants, args, kwargs)
return result
And I think we should move to something more like this:
def get_len(foo: int, bar: str):
result = _mutmut_trampoline(x_get_len__mutmut_orig, x_get_len__mutmut_mutants, args=[foo, bar], kwargs=...)
return result
We probably should also preserve async keywords (see #454 ).
I think instead of copying signature and annotation to the trampoline function (see #464 ), we should construct a trampoline with an identical signature. This should be more robust than trying to copy.
For instance, for a method like this:
we currently create a trampoline like this:
And I think we should move to something more like this:
We probably should also preserve async keywords (see #454 ).