Open vxgmichel opened 5 months ago
Interestingly, that issue has been addressed on the pylance tracker last week: https://github.com/microsoft/pylance-release/issues/5840#issuecomment-2089378623
In summary, I think the pyright type analyzer is doing the right thing here and preserving the docstring, but the hover provider (which is owned by the pylance team) is not using this information when the identifier is an instance of a callable object (i.e. an instance of a class that has a
__call__
method). So I think this is a feature request for the Pylance team to add such support.
It seems like this will be fixed in the future.
Pylance does not show the actual docstring and prototype when overing a stream operators:
Surprisingly, it does show it for their
pipe
method:Also, it does show when opening a parenthesis after a stream operator:
Note that introspection does work properly: