-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
importlib
documentation doesn't declare functions properly
#125018
Comments
Use triple backticks |
@serhiy-storchaka nope, @ncoghlan is right. For the full list of exposed objects, I have this little helper that updates every several hours: https://webknjaz.github.io/intersphinx-untangled/docs.python.org/. And the terminal way to see what's exposed would be These references don't come from Python runtime but from Sphinx. They must be properly declared in Sphinx in order to be linkable. Single backticks work depending on Sphinx config. In that case, it's because of |
I meant that you can use triple quotes to quote text containing single or double backquotes in Markdown. |
I fixed the initial post to avoid requiring imagination of the actual reference syntax (thanks to @serhiy-storchaka's tip, I learned something new about Markdown today: https://meta.stackexchange.com/questions/82718/how-do-i-escape-a-backtick-within-in-line-code-in-markdown ). |
This allows direct intersphinx references to APIs via references like `` :func:`importlib.metadata.version` ``.
Posted a PR that adds the minimal text needed to define valid semantic cross-reference targets. The phrase "as described below" features heavily in their descriptive text, since I didn't want to embark on a wholesale rewrite of the module docs just to fix a cross-referencing issue. |
One stray backtick still renders for me, though.. |
This allows direct intersphinx references to APIs via references like `` :func:`importlib.metadata.version` ``. --------- Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…#125027) This allows direct intersphinx references to APIs via references like `` :func:`importlib.metadata.version` ``. --------- Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Adam Turner <[email protected]> (cherry picked from commit cda3b5a)
…5027) (#125048) This allows direct intersphinx references to APIs via references like `` :func:`importlib.metadata.version` ``. --------- (cherry picked from commit cda3b5a) Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Adam Turner <[email protected]>
(cherry picked from commit 10094a5) Co-authored-by: Adam Turner <[email protected]>
…5027) (#125047) gh-125018: Add importlib.metadata semantic link targets (#125027) This allows direct intersphinx references to APIs via references like `` :func:`importlib.metadata.version` ``. (cherry picked from commit cda3b5a) --------- Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Adam Turner <[email protected]>
(cherry picked from commit 10094a5) Co-authored-by: Adam Turner <[email protected]>
Thanks for the syntax cleanups @AA-Turner (I incorrectly assumed that Sphinx would error on the |
https://docs.python.org/3/library/importlib.metadata.html#distribution-versions doesn't actually define a Sphinx function for
version
, so attempted references with`:func:`importlib.metadata.version`
(including via theintersphinx
extension) fail.Edit: fixed the backticks thanks to @serhiy-storchaka's tip below (TIL that you can use repeated backticks with trailing and leading space for inline code markup, allowing inclusion of single backticks in the quoted code)
Linked PRs
The text was updated successfully, but these errors were encountered: