auto complete `__doc__` missing
Describe the Bug
from pathlib import Path
Path(".").read_text.__do
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
vscode-insider
0.35.0
@asukaminato0721 thanks for reporting this!
@kinto0 (when you're back), thoughts?
My first thought is it's likely related to this: https://github.com/facebook/pyrefly/issues/1076
It requires further investigation though.
This issue has someone assigned, but has not had recent activity for more than 2 weeks.
If you are still working on this issue, please add a comment so everyone knows. Otherwise, please unassign yourself and allow someone else to take over.
Thank you for your contributions!
It's here...
https://github.com/python/typeshed/blob/65b8a85e4b775d5465e7fdb7382c181fb7efa958/stdlib/types.pyi#L76
I think it's because because it's inherited from object
https://github.com/python/typeshed/blob/65b8a85e4b775d5465e7fdb7382c181fb7efa958/stdlib/builtins.pyi#L110
We skip object's attributes for completions, per the definition of completions_class (according to the comment, this is because there were a lot of things cluttering the results)
https://github.com/facebook/pyrefly/blob/main/pyrefly/lib/alt/attr.rs#L2017
Maybe the fix should be that we should start giving results for object, only if regular completions w/o object don't give any results?
Curious to hear everyone's thoughts.
Maybe the fix should be that we should start giving results for object, only if regular completions w/o object don't give any results?
That works, or we just sort object items to the bottom. Sorting seems easier since changing completions as it's typed would mean chaing our isIncomplete behavior
Depends on whether we want to keep completions list short, i suppose.