Is there any Python type-hinting syntax to state that a function takes the same parameters (and parameter types) as another function? In particular this is useful for wrapping, e.g.,
async def do_stuff(
param1: str,
param2: int,
param3: int = 14,
):
...
def run_async_thing(*args, **kwargs): # <--- What can I put here to say 'takes args like `do_stuff`'?
return asyncio.get_event_loop().run_until_complete(do_stuff(*args, **kwargs))
In this case, I would like to add type hinting to the run_async_thing function to identify that it expects the same argument types as the do_stuff function.
Is this possible, and if so, how?
The primary reason for wanting this is so that my tools (in particular PyCharm/IntellliJ IDEA) can figure out what arguments run_async_thing should expect/accept. If it helps with documentation that's a bonus, but this is mainly for tooling.
