Skip to content
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

Missing docstrings for builtins (pyright) #712

Closed
YodaEmbedding opened this issue Dec 10, 2020 · 7 comments
Closed

Missing docstrings for builtins (pyright) #712

YodaEmbedding opened this issue Dec 10, 2020 · 7 comments
Labels
needs decision Do we want this enhancement?

Comments

@YodaEmbedding
Copy link

Docstrings for third-party libraries and custom functions work. Would it be possible to reallow builtin functions (e.g. print) to also display docstrings?

This issue from the pylance repository contains more details: #49

I am using the extension with Python 3.8.3. On hover for any function, the tooltip shows only the type information (of parameters, return value etc.).
I'd prefer it showing the documentation of the function (wherever available) as well, so that it is clear what the function is being used for. This can be seen demonstrated in the Pylance announcement blog post for the pandas library.

Environment data

* Language Server version: 2020.6.1

* OS and version: Windows 10 Version 20H2 (OS Build 19042.330)

* Python version: 3.8.3 64-bit

Expected behaviour

Before installing pylance
image

Actual behaviour

After installing pylance
image

@erictraut
Copy link
Contributor

I'm going to transfer this request to pylance since it's not a type checking issue.

@erictraut erictraut transferred this issue from microsoft/pyright Dec 10, 2020
@bschnurr
Copy link
Member

Please update your pylance version to the latest 2020.12.1
you should see doc strings for print

@savannahostrowski savannahostrowski added the waiting for user response Requires more information from user label Dec 10, 2020
@github-actions github-actions bot removed the triage label Dec 10, 2020
@savannahostrowski
Copy link
Contributor

To be clear, is the request to have this work in pyright?

@YodaEmbedding
Copy link
Author

To be clear, is the request to have this work in pyright?

Yes, that is correct.

It's useful for developers using pyright as a replacement for the (deprecated?) Microsoft Python Language Server in editors such neovim.

@jakebailey jakebailey added needs decision Do we want this enhancement? and removed waiting for user response Requires more information from user labels Jan 13, 2021
@HawickMason
Copy link

Still got problems on builtin docstring under pylance version 2021.1.1 while under a venv......
image
When I click on the builtin funcitons, it goes to
image
Any clue?

@jakebailey
Copy link
Member

@HawickMason This issue is about the decision to shift the builtin docstring code from Pylance into pyright, not for general issues with builtin docstrings. If you're using Pylance and have an issue with it's current builtin docstring support, it's unrelated and we'd appreciate a new issue with our bug template filled out.

@savannahostrowski
Copy link
Contributor

This request has been open for a long while without upvotes and as such, we cannot prioritize this work so I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs decision Do we want this enhancement?
Projects
None yet
Development

No branches or pull requests

6 participants