-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-41872: Parse docstrings with ast instead of string manipulation #127520
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
9e0835c
Instead of manual parsing of doc strongs, use ast.literal_eval to par…
srinivasreddy d9fe8dd
Add tests for doc strings
srinivasreddy ab176ab
Remove unnecessary comments
srinivasreddy c21f342
Fix typo
srinivasreddy d750ee5
Update Lib/pydoc.py
srinivasreddy 38b13e5
Add breathing space
srinivasreddy 4bb399d
Fix name collision / shadowing
srinivasreddy 272ca67
Change the logic
srinivasreddy 5ef8adb
Fix typo
srinivasreddy e306542
Update Lib/pydoc.py
srinivasreddy 6ff1ac3
Address review comments
srinivasreddy 8c073a5
Correct the logic
srinivasreddy 91df3f0
Merge branch 'main' into gh-41872
srinivasreddy f122cc6
Add blurb
srinivasreddy 08cf0a5
Merge branch 'main' into gh-41872
srinivasreddy 5e6a78b
Remove the redundant binary file check
srinivasreddy f54711e
Update test cases
srinivasreddy fb5dc83
Update Lib/test/test_pydoc/test_pydoc.py
srinivasreddy bd0e7eb
Update Lib/test/test_pydoc/test_pydoc.py
srinivasreddy 233fbd6
Update Lib/test/test_pydoc/test_pydoc.py
srinivasreddy ec7e431
Update Lib/test/test_pydoc/test_pydoc.py
srinivasreddy c004506
Update Lib/test/test_pydoc/test_pydoc.py
srinivasreddy 204e5bb
Add commas
srinivasreddy dae74dd
Merge branch 'main' into gh-41872
srinivasreddy 54519d9
Address review comments
srinivasreddy 835fea2
Update Lib/test/test_pydoc/test_pydoc.py
srinivasreddy b7c42ea
Handle concatenated string, parentheses, newlines, and add more tests.
serhiy-storchaka 6d6e983
Add more tests. Refactor tests.
serhiy-storchaka 511b5d0
Update a NEWS entry.
serhiy-storchaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Library/2024-12-17-15-23-40.gh-issue-41872.31LjKY.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Fix quick extraction of module docstrings from a file in :mod:`pydoc`. | ||
It now supports docstrings with single quotes, escape sequences, | ||
raw string literals, and other Python syntax. |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.