Skip to content

gh-62587: Add 'symbols' link to pydoc's html menu bar#13225

Open
CuriousLearner wants to merge 3 commits into
python:mainfrom
CuriousLearner:fix-Issue18387
Open

gh-62587: Add 'symbols' link to pydoc's html menu bar#13225
CuriousLearner wants to merge 3 commits into
python:mainfrom
CuriousLearner:fix-Issue18387

Conversation

@CuriousLearner

@CuriousLearner CuriousLearner commented May 9, 2019

Copy link
Copy Markdown
Member

@ZackerySpytz ZackerySpytz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Lib/pydoc.py
self.maxdict = 10
self.maxstring = self.maxother = 100

def escape(self, text):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that removing this method causes a failure in test_cgitb.

Comment thread Lib/pydoc.py Outdated

heading = html.heading(
'<big><big><strong>INDEX</strong></big></big>',
'<big><big><strong>%s</strong></big></big>' % title.upper(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an f-string should be used here.

Comment thread Lib/pydoc.py Outdated
title = 'SYMBOL'
contents, xrefs = htmlhelp._getsymbol(topic)
else:
raise ValueError('could not find topic %s' % repr(topic))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an f-string should be used here.

Comment thread 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))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP 8 states that lines should be limited to 79 chars.

@csabella

csabella commented Dec 1, 2019

Copy link
Copy Markdown
Contributor

@CuriousLearner, please address the code reviews. Thanks!

- 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 <ron3200@gmail.com>
@CuriousLearner CuriousLearner marked this pull request as ready for review November 14, 2025 02:48

@auvipy auvipy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks better

@github-actions

github-actions Bot commented Feb 1, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Feb 1, 2026
@CuriousLearner CuriousLearner requested review from ZackerySpytz, csabella and ncoghlan and removed request for ZackerySpytz March 28, 2026 21:17
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Mar 29, 2026
@picnixz picnixz changed the title bpo-18387: Add 'symbols' link to pydoc's html menu bar gh-62587: Add 'symbols' link to pydoc's html menu bar Mar 29, 2026
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants