-
Notifications
You must be signed in to change notification settings - Fork 1.2k
docstring for function with decorators display the doc for the decorator not the the function #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @tangorboyz on November 2, 2017 5:15 Another info: if we type the object method with decorators, the doc for the decorators is displayed. |
I would argue you don't want the original module's docstring and what you want is the docstring that the wrapped function ends up with. |
I see a lot of inconsistent behavior with decorators/docstrings/argspecs when using intellisense. Is it possible to get this issue reopened and reviewed again? My framework requires very heavy use of decorators and decorator factories to prevent duplicate code, and this makes it hard for anyone not already familiar with the API to understand the function calls. I have included example screenshots, as well as the code for those screenshots. The following screenshots were very hard to get, I had to close and reopen vscode several times to get the message to show. Based on how many times I messed with it to see the incorrect behavior, I have a suspicion that some kind caching logic may be involved, but as I have not looked at the extension code, I cannot be sure. Simple decoratorsDecorator factoriesSample Code |
@iamtheauthor I can't reproduce this, but since we are working on a new analysis engine to replace Jedi and that's where I suspect the problem is, I'm going to close this for now. If you manage to create a reproducer or the new analysis engine doesn't do the right thing, please let us know. |
From @tangorboyz on October 29, 2017 11:25
Environment data
VS Code version: 1.18.0-insider

Python Extension version:
Python Version: 0.7.0
OS and version: Ubuntu 16.04
Actual behavior
When hover over a function with decorators like
@properties
display the the doc for@properties
Expected behavior
It should only display the doc for the function.
As you can see at picture above,
is_authenticated
is decorated with@properties
. But when hover over onis_authenticated
, the doc for@properties
is displayed.Copied from original issue: DonJayamanne/pythonVSCode#1352
The text was updated successfully, but these errors were encountered: