Is displaying docstrings from typestubs supposed to work? #26
Replies: 2 comments 3 replies
-
This is PyCharm itself doing the go-to jump, with a PyCharm-bundled file as the destination. I'm looking into PyCharm's log, and I'm actually unsure how/why Pyright doesn't get a request, even if the corresponding option is on. On VSCode, Pyright (as in the
I'm sure the definition Pyright has in mind is this one, which is exactly the same as how the tooltip is displayed, no docstring: def len(obj: Sized, /) -> int: ... (Side note: Pylance seems to be able to directs For our executables, I would expect the destination to be somewhere inside |
Beta Was this translation helpful? Give feedback.
-
Should be noted that PyCharm itself already fail to handle docs for at least certain type-stubbed libraries: https://youtrack.jetbrains.com/issue/PY-41716/Rendering-of-external-documentation-for-stdlib-doesnt-work-for-definitions-that-have-.pyi-stubs |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
With my configuration, clicking on
len("asdf")
jumps to a typestub forlen
which has a docstring. Yet pyright only show the type info when I invoke quickdock onlen
.Is this expected, or is there something I can configure?
It's notable that the typestub it jumps to does not include type information...
So maybe it's pycharm itself jumping (if pyright are not able to do the jump?) ("go to" -> "type declaration" does nothing)
Beta Was this translation helpful? Give feedback.
All reactions