-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update PEP 8 style to match modern PEP 8
PEP 8 was updated last year to prefer that line splits come before binary operators, rather than after: https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator python/peps@c59c437 Really there should be a way to do this for other binary operations... for example, even with this setting, YAPF wants to do: ``` orig_extracted = ( - extract_tb(orig.__traceback__) - + extract_tb(orig.exceptions[0].__traceback__) - + extract_tb(orig.exceptions[0].exceptions[1].__traceback__)) + extract_tb(orig.__traceback__) + + extract_tb(orig.exceptions[0].__traceback__) + + extract_tb(orig.exceptions[0].exceptions[1].__traceback__)) ``` which is exactly what the example in PEP 8 says not to do. But this patch brings YAPF's PEP 8 style closer to what PEP 8 says.
- Loading branch information
Showing
2 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
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
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