You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiline :param descriptions in docstrings are truncated to the first line when hovering over a parameter.
Steps to trigger the problem:
Open Zed with a clean installation.
Create a new Python file (test.py).
Copy and paste the following function definition with a Sphinx-style docstring:
defprocess_data(data: list[float], threshold: float) ->dict[str, list[float]]:
""" Processes the given data and applies a threshold. :param data: A list of numerical values that need to be processed. Each value represents a measurement taken from a sensor. The function will filter out values that do not meet certain criteria. :type data: list[float] :param threshold: A float value representing the cutoff threshold. Values below this threshold will be ignored in the final result. :type threshold: float :return: A dictionary containing the processed data. :rtype: dict[str, list[float]] """return {"processed_data": [xforxindataifx>=threshold]}
Hover over the data or threshold parameter in the function signature.
Actual Behavior:
The tooltip only displays the first line of the :param description.
The rest of the multiline description is missing.
Expected Behavior:
The tooltip should display the full multiline description of each :param entry, including all indented lines.
This behavior should be consistent with how IDEs handle Google- or NumPy-style docstrings.
Thank you for reporting! Indeed hovering over the data or tooltip only shows the first sentance it doesn't show the full explanation as given in the docstring.
{"jsonrpc":"2.0","id":111,"result":{"contents":{"kind":"markdown","value":"```python\n(parameter) data: list[float]\n```\ndata: A list of numerical values that need to be processed."},"range":{"start":{"line":0,"character":17},"end":{"line":0,"character":21}}}}
Please make an issue upstream https://github.com/microsoft/pyright/. If you still think its an issue in zed you can always reopen the issue or make a new one!
Summary
Multiline
:param
descriptions in docstrings are truncated to the first line when hovering over a parameter.Steps to trigger the problem:
Open Zed with a clean installation.
Create a new Python file (
test.py
).Copy and paste the following function definition with a Sphinx-style docstring:
Hover over the data or threshold parameter in the function signature.
Actual Behavior:
Expected Behavior:
Zed Version and System Specs
Zed: v0.175.0 (Zed Preview)
OS: macOS 15.3.0
Memory: 32 GiB
Architecture: aarch64
The text was updated successfully, but these errors were encountered: