-
I'm using pyright directly, not via pylance. What is the canonical way to have the language server return docstrings for builtins? One hacky thing I tried was adding a custom It seems to me, there must be an easier way though. Thank you @msfterictraut and team for your wonderful work with pyright. Much appreciate it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
A bad news for you #4250 (comment) |
Beta Was this translation helpful? Give feedback.
-
@jfcherng Thanks for the pointer. I now more clearly understand that Pyright is most concerned with type checking functionality. This separation of concerns makes sense to me. However, my question remains—is the "hacky" way I outlined the most canonical way to add custom builtin-docstrings if one can't use Pylance? It seems Pylance uses Pyright as its "core typing engine" and thus also uses its API? |
Beta Was this translation helpful? Give feedback.
If you want this capability, the recommendation is to switch to pylance, which adds this and many other language server features on top of pyright.
There is no "canonical way" to add features to pyright that it was not designed to support. It sounds like you've found a way to get the behavior you're looking for.