Open PeterJCLaw opened 3 years ago
Unassigning as I've not found time for this and realistically I'm not sure I'm going to any time soon. I've enjoyed working on Jedi, though recently my focus has been elsewhere.
Understandable! Thanks a lot anyways for the work you've done on generics. Feel free to pick it up again any time. What are you up to these days?
I'm mostly rewriting Jedi in Rust these days, so I also do not have the time for now.
I've not tested it, so the simple case miiight just work (though I doubt it). I'm pretty sure the interesting cases won't work out of the box. PEP 612 introduces a new mechanism for spelling
Callable
type signatures and allows adjusting them as part of a decorator.Currently Jedi understands cases like:
However with PEP 612 the following becomes possible:
I suspect the
decorator_same_sig
may work (i.e: decorated functions have their name/docstring/etc.) passed through as if they were unaltered, though I'm not sure.I doubt that
decorator_changed_sig
will pass through the name/docstring etc. and it's not clear exactly what the right behaviour would be even if they were. It would be great to be able to at least show the right signature (i.e: adjusted as the annotation notes) for decorated functions in this case as that seems unambiguously correct.