Skip to content

Doc: Cross-reference ShapeBase sub-classes from the Programming Guide #1289

@pushfoo

Description

@pushfoo

Is your feature request related to a problem? Please describe.

TL;DR: This page seems like it should cross-ref the classes in the API doc: https://pyglet.readthedocs.io/en/latest/programming_guide/shapes.html

Describe the solution you'd like

This can be done using short-hand syntax in ReST:

Here is a one-item list of shapes:

* :py:class:`~pyglet.shapes.Rectangle`

The output would be a link which looks like this: Rectangle

Additional context

It's also possible to set the current module for the file to allow skipping pyglet.shapes to write:

.. py:currentmodule:: pyglet.shapes

Here is a one-item list of shapes:

* :py:class:`Rectangle`

However, this comes at the price of:

  • decreasing search legibility for grep and GitHub's code search tools
  • making Sphinx behavior even harder to reason about

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions