ty icon indicating copy to clipboard operation
ty copied to clipboard

Improve rendering of ReST directives in docstrings

Open AlexWaygood opened this issue 1 week ago • 0 comments

Summary

For example, the stdlib method logging.Filterer.filter has several ReST directives at the bottom of its docstring that tell you when the API was updated: https://github.com/astral-sh/ruff/blob/b4c2825afdd8c1010c3a5859521629d2d1e0a6df/crates/ty_vendored/vendor/typeshed/stdlib/logging/init.pyi#L136-L142. Pylance renders these as sentences that use English words:

Image

And Sphinx renders them similarly in CPython's online HTML documentation:

Image

But we currently just render these as "versionchanged:: 3.2":

Image

AlexWaygood avatar Dec 21 '25 16:12 AlexWaygood