MarketSquare / robotframework-requests

Robot Framework keyword library wrapper for requests
http://marketsquare.github.io/robotframework-requests/
MIT License
482 stars 279 forks source link

Decorators hide arguments for keywords, breaking intellisense for Vscode and robot LSP #367

Closed Serhiy1 closed 1 year ago

Serhiy1 commented 1 year ago

Using the robotframework-requests library with the Robot language server plugin for vs code. I have noticed that auto-complete does is not aware of the arguments for all of the keywords. instead, it reports *args and **kwargs.

image

This is due to the decorator functions warn_if_equal_symbol_in_url_on_session and warn_if_equal_symbol_in_url_session_less not shadowing the original function signature.

Adding decorator.__signature__ = inspect.signature(func) inside the two wrapping functions fixes this issue.

image

Alternatively, we can get rid of the manual assignments and user the warps decorator from the standard functools library

lucagiove commented 1 year ago

closed like the PR