Repository navigation
gh-161415: Remove nonexistent related help topics in pydoc - #161417
Open
andresdelfino wants to merge 4 commits into
Open
andresdelfino wants to merge 4 commits into
andresdelfino wants to merge 4 commits into
Conversation
The TYPES topic listed FILES, which was removed from Helper.topics in Python 3.4, and the UNICODE topic listed unicode, the Python 2 built-in type. help() finds no entry for either of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sobolevn
reviewed
Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sobolevn
reviewed
Nov 6, 2026
| for name, target in (*pydoc.Helper.topics.items(), | ||
| *pydoc.Helper.keywords.items()): | ||
| if not isinstance(target, tuple): | ||
| continue |
Member
There was a problem hiding this comment.
any reason why we ignore non-tuple items? maybe we can just make one instead? target = ('', target)
this way we can also check things like 'PACKAGES': 'import',
Contributor
Author
There was a problem hiding this comment.
Good idea! I'll apply your suggestion.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
help('TYPES')listedFILESandhelp('UNICODE')listedunicodeunder "Related help topics", buthelp()finds no entry for either. TheFILEStopic was removed fromHelper.topicsin 3.4 (gh-63118) while the cross-reference fromTYPESwas kept, andunicodeis the Python 2 built-in type. This removes both.The new test runs
help()on every related topic listed by thehelp()topics and keywords, and on the target of every alias entry (such as'PACKAGES': 'import'), and checks that none of them prints "No help entry found". Without the fix it fails for exactly these two entries.🤖 Generated with Claude Code
help()lists related topics that do not exist (FILES,unicode) #161415