Skip to content

Conversation

Wolf359Stella
Copy link

Refers to issue #825 .
This pull request implements the following:

  • Adds a new command line argument, -l / --link-library, which uses the same format as -e / --edit-url.
  • Pass link-library to jinja env as link_library
  • Adds the function get_stdlib_doc_link to pdoc/render_helpers.py, which will be used to identify if a string is a reference to a standard python library. If so it returns a hyperlink to it, otherwise it returns None
  • Use get_stdlib_doc_link along with link_library dictionary as additional test for type annotation in both linkify and link functions from pdoc/render_helpers.py.

The result is that the documentation now adds hyperlink to both standard libraries and third-party libraries.
I run the pytests and some are failing. I was able to group them into 3 groups:

  • Failing because standard libraries now have hyperlinks
  • enum.txt, which required to update a substring that looked like it was caused just by python version differences.
  • demopackage_dir.html, which I based on search pre-processing and I can´t be sure it is ok.
    I fixed all, as asked in the guideline

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

Successfully merging this pull request may close these issues.

1 participant