-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-38870: Docstring support for function/class/module nodes #17760
Merged
Conversation
This file contains 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
8dad551
to
f59a488
Compare
@isidentical Can you rebase this against the latest master? Ping me when is ready and I can do another review |
621e6e0
to
f89548b
Compare
pablogsal
reviewed
Mar 1, 2020
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
pablogsal
reviewed
Mar 1, 2020
pablogsal
reviewed
Mar 1, 2020
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
pablogsal
reviewed
Mar 1, 2020
This comment has been minimized.
This comment has been minimized.
pablogsal
reviewed
Mar 2, 2020
pablogsal
reviewed
Mar 2, 2020
pablogsal
reviewed
Mar 2, 2020
pablogsal
reviewed
Mar 2, 2020
pablogsal
reviewed
Mar 2, 2020
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
… into bpo-38870-docstrings
pablogsal
reviewed
Mar 2, 2020
@@ -360,6 +361,9 @@ def test_docstrings(self): | |||
self.check_src_roundtrip(f"{prefix}{docstring}") | |||
|
|||
def test_docstrings_negative_cases(self): | |||
# Test some cases that involve strings in the children of the | |||
# first node but aren't docstrings to make sure we don't have | |||
# False positives. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
# False positives. | |
# false positives. |
pablogsal
approved these changes
Mar 2, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Great job, @isidentical 💪 🎉
sthagen
added a commit
to sthagen/python-cpython
that referenced
this pull request
Mar 2, 2020
bpo-38870: Add docstring support to ast.unparse (pythonGH-17760)
colesbury
referenced
this pull request
in colesbury/nogil
Oct 6, 2021
Allow ast.unparse to detect docstrings in functions, modules and classes and produce nicely formatted unparsed output for said docstrings. Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
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/issue38870