Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Data types defined under a Yield attribute aren't properly linked #25

Open
TheFriendlyCoder opened this issue Jul 24, 2020 · 1 comment

Comments

@TheFriendlyCoder
Copy link

TheFriendlyCoder commented Jul 24, 2020

Typically when one defines a return value in a method they will use the following syntax:

Returns:
    int:
        some value

When doing so the return type, int in this case, is hyperlinked to the api docs for the appropriate data type (ie: using interphinx).

However, when writing doc strings for generators using the same / similar syntax provided by the Yield attribute, the data type associated with the generator is not appropriately decorated. Taking the previous example code snippet and making a small modification as show below is sufficient to demonstrate the change in behavior:

Yields:
    int:
        some value

The HTML markup produced by this code snippet simply format the data type using custom font formatting based on the theme, but it fails to associate / generate the hyperlink for the API docs for the data type as is done by the Return attribute.

NOTE: I am using the apidocs Sphinx extension to generate the API docs for my projects in case that has any impact on this behavior.

Here are my key dependencies and versions in case this helps track down the problem:

  • sphinx (with the built-in napoleon and intersphinx plugins) v2.3.1
  • sphinxcontrib-apidoc v0.3.0
@McSinyx
Copy link

McSinyx commented Jul 24, 2020

Hi @TheFriendlyCoder, you might want to consider filing this issue against Sphinx. Before doing so, please perform a quick check to see if the problem persists with the latest release.

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

No branches or pull requests

2 participants