-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix crashes on docstring whitespace changes #1417
Conversation
|
||
|
||
def single_line(): | ||
"""But with a newline after it!""" | ||
pass |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
Nevermind, didn't see the output comment. Sorry about the unnecessary notifications.
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.
Thanks for the fix!
The PEP 257 algorithm used in psf#1053 results in trimming trailing whitespace in docstrings -- see psf#1415 and fixes in psf#1417. Removing trailing whitespace may result in four quotes in a row: def foo(): """"Some content and more "here" """ pass When closing the docstring, escape any trailing quote characters that it matches, if they are not already escaped. Fixes psf#1446.
The PEP 257 algorithm used in psf#1053 results in trimming trailing whitespace in docstrings -- see psf#1415 and fixes in psf#1417. Removing trailing whitespace may result in four quotes in a row: def foo(): """"Some content and more "here" """ pass When closing the docstring, escape any trailing quote characters that it matches, if they are not already escaped. Fixes psf#1446.
0;95;0c The PEP 257 algorithm used in psf#1053 results in trimming trailing whitespace in docstrings -- see psf#1415 and fixes in psf#1417. Removing trailing whitespace may result in four quotes in a row: def foo(): """"Some content and more "here" """ pass When closing the docstring, escape any trailing quote characters that it matches, if they are not already escaped. Fixes psf#1452.
The PEP 257 algorithm used in psf#1053 results in trimming trailing whitespace in docstrings -- see psf#1415 and fixes in psf#1417. Removing trailing whitespace may result in four quotes in a row: def foo(): """"Some content and more "here" """ pass When closing the docstring, escape any trailing quote characters that it matches, if they are not already escaped. Fixes psf#1452.
The PEP 257 algorithm used in psf#1053 results in trimming trailing whitespace in docstrings -- see psf#1415. Adjust the algorithm to preserve leading and trailing whitespace; this reverts the changes in psf#1417. This diverges from PEP 257, but better retains the contents of the docstring. Fixes psf#1452 because we no longer can end up with four trailing quotes.
Fixes #1415