Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to format signatures in docstrings #631

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

krassowski
Copy link
Member

This is a proposal for #630. It comes down to:

  • adding pylsp_signatures_to_markdown hook which takes a list of strings (signatures) and returns a single (markdown) string
  • reading the hook value and passing it down as signatures_to_markdown to format_docstring

Using a list → str approach allows the hook to modify how alternative signatures are displayed.

There are no user-facing changes.

@krassowski krassowski marked this pull request as ready for review March 31, 2025 14:20
@krassowski
Copy link
Member Author

krassowski commented Apr 4, 2025

Any thoughts @ccordoba12 ? It would be amazing to get it in to allow downstreams to customize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant