Skip to content

improve handling of trailing underscores in .pyi docstrings #661

@Josverl

Description

@Josverl

currently these are not rendered correctly in VSCode
Image

a few thousand `_.
Image

In reStructuredText the trailing underscore in a construct like
that uses the littlefs v2 filesystem format_.
signals an inline hyperlink. The text within the backtick is the link text and the optional URL is provided in angle brackets. Without the trailing underscore, reStructuredText wouldn’t interpret the markup as a hyperlink.

Possible solutions:

  • clean up in docstring processing
    • both foo_ and foo_ are common
    • risky for sequences like On success, the ``_IRQ_PERIPHERAL_DISCONNECT`` or ``_IRQ_CENTRAL_DISCONNECT`` event will be raised.
  • raise an issue with vscode to render this correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions