ruff
b0b65c24 - [ty] Initial implementation of signature help provider (#19194)

Commit
86 days ago
[ty] Initial implementation of signature help provider (#19194) This PR includes: * Implemented core signature help logic * Added new docstring method on Definition that returns a docstring for function and class definitions * Modified the display code for Signature that allows a signature string to be broken into text ranges that correspond to each parameter in the signature * Augmented Signature struct so it can track the Definition for a signature when available; this allows us to find the docstring associated with the signature * Added utility functions for parsing parameter documentation from three popular docstring formats (Google, NumPy and reST) * Implemented tests for all of the above "Signature help" is displayed by an editor when you are typing a function call expression. It is typically triggered when you type an open parenthesis. The language server provides information about the target function's signature (or multiple signatures), documentation, and parameters. Here is how this appears: ![image](https://github.com/user-attachments/assets/40dce616-ed74-4810-be62-42a5b5e4b334) --------- Co-authored-by: UnboundVariable <unbound@gmail.com> Co-authored-by: Micha Reiser <micha@reiser.io>
Parents
Loading