bpo-18387: Add 'symbols' link to pydoc's html menu bar#13225
Open
CuriousLearner wants to merge 3 commits intopython:mainfrom
Open
bpo-18387: Add 'symbols' link to pydoc's html menu bar#13225CuriousLearner wants to merge 3 commits intopython:mainfrom
CuriousLearner wants to merge 3 commits intopython:mainfrom
Conversation
auvipy
approved these changes
May 31, 2019
ZackerySpytz
reviewed
Aug 1, 2019
Contributor
ZackerySpytz
left a comment
There was a problem hiding this comment.
There are several CI failures.
When creating a PR based on someone else's patch, the developer's guide states that the "Co-authored-by" syntax should be used in the commit message to attribute the original patch author.
| self.maxdict = 10 | ||
| self.maxstring = self.maxother = 100 | ||
|
|
||
| def escape(self, text): |
Contributor
There was a problem hiding this comment.
It seems that removing this method causes a failure in test_cgitb.
Lib/pydoc.py
Outdated
|
|
||
| heading = html.heading( | ||
| '<big><big><strong>INDEX</strong></big></big>', | ||
| '<big><big><strong>%s</strong></big></big>' % title.upper(), |
Contributor
There was a problem hiding this comment.
I think an f-string should be used here.
Lib/pydoc.py
Outdated
| title = 'SYMBOL' | ||
| contents, xrefs = htmlhelp._getsymbol(topic) | ||
| else: | ||
| raise ValueError('could not find topic %s' % repr(topic)) |
Contributor
There was a problem hiding this comment.
I think an f-string should be used here.
Lib/pydoc.py
Outdated
|
|
||
| def bltinlink(name): | ||
| return '<a href="topic?key=%s">%s</a>' % (name, name) | ||
| return '<a href="topic?key=%s">%s</a>' % (html_escape(name), html_escape(name)) |
Contributor
There was a problem hiding this comment.
PEP 8 states that lines should be limited to 79 chars.
Contributor
|
@CuriousLearner, please address the code reviews. Thanks! |
b89cd6b to
5a2112f
Compare
c46ecc5 to
90614a6
Compare
90614a6 to
4156e4e
Compare
- Added 'symbols' navigation link alongside 'topics' and 'keywords' - Refactored html_topicindex() to handle topics, keywords, and symbols - Added _getsymbol() method to Helper class for symbol lookup - Restored escape() method in HTMLRepr and HTMLDoc classes - Updated test suite to include symbols link verification - Modernized string formatting using f-strings Original patch by Ron Adam. Co-authored-by: Ron Adam <[email protected]>
4156e4e to
4adc99e
Compare
|
This PR is stale because it has been open for 30 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.python.org/issue18387
Ref #62587