is there a way/extension to add docstring-like annotations to parameter strings

24 views Asked by At

I am currently using a request based module to call functions between containers in azure container apps. The default module looks like

send_request(method: str, endpoint: str, params: dict={}, headers: dict={}, data: json=None, file: bytes=None)

and in practice looks something like: send_request(method="GET", endpoint="random-file-endpoint", params={"operation":"download-file" ,"path":"path/to/file"})

In the example above, the 'operation' (download-file) refers a method that sits in a different azure container, and the endpoint refers to the .py file that said method exists in. I am wondering if theres a way that I can hover my cursor over the "download-file" part and have that methods docstring be displayed (similar to how hovering over send_request() displays its docstring)?

I am assuming that this isnt feasible without just importing the desired function into wherever its being called (which would undermine the reason that we are using a request based approach) but just wondering if anyone had some input. Currently using vscode and python 3.8.10

0

There are 0 answers