-
Notifications
You must be signed in to change notification settings - Fork 767
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
PyLance using "object()" docs, instead of user-defined #1205
Comments
Checking up on this. Haven't heard back as to whether this is being investigated? |
This has to do with the way that we look up docs for init functions. Right now, it appears as though we are looking up the class hierarchy for a doc for Changing this so that we walk up the hierarchy once (init then class, repeatedly) would fix this, but cause other issues where the parent class's method doc is what is intended (plus is a little hard to do). I think that we can probably just omit object's init function doc from our builtin scraped output for now as a workaround, but this does need more testing and speccing (and we have been working on other things, hence the lack of updates; but we do know the root cause). |
@jakebailey Excellent, thank you for the update. It's not a major problem, just an annoying persistent one. Let me know if you need anything further from me :) |
@jakebailey I'm currently seeing this on a large subset of classes. I agree I'd much rather be shown no docstring than see the base One such example is the |
This is technically a duplicate of #1047, but my plan for this specific issue in the short term is to disable docstring inheritance from the builtins (so no classes get |
The next release will include the above change. |
Thank you for your work with this, Jake. I appreciate it :) |
This issue has been fixed in version 2021.9.1, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202191-8-september-2021 |
Environment data
Expected behaviour
Use the user-defined docs instead of
object()
's.Example
![image](https://user-images.githubusercontent.com/23083317/116557874-7ed6e100-a8c4-11eb-90f3-98099df934d9.png)
Actual behaviour
Also very intermittent. Works sometimes, but not always.
Logs
Python Language Server Log
pylancelog.txt
Code Snippet / Additional information
The text was updated successfully, but these errors were encountered: