-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardise newlines after module-level docstrings (#3932)
Co-authored-by: jpy-git <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
- Loading branch information
1 parent
7aa37ea
commit b7717c3
Showing
16 changed files
with
132 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Caching of formatted files with feature-based invalidation.""" | ||
|
||
import hashlib | ||
import os | ||
import pickle | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Generating lines of code. | ||
""" | ||
|
||
import sys | ||
from dataclasses import replace | ||
from enum import Enum, auto | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Formatting numeric literals. | ||
""" | ||
|
||
from blib2to3.pytree import Leaf | ||
|
||
|
||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# flags: --preview | ||
"""Single line module-level docstring should be followed by single newline.""" | ||
|
||
|
||
|
||
|
||
a = 1 | ||
|
||
|
||
"""I'm just a string so should be followed by 2 newlines.""" | ||
|
||
|
||
|
||
|
||
b = 2 | ||
|
||
# output | ||
"""Single line module-level docstring should be followed by single newline.""" | ||
|
||
a = 1 | ||
|
||
|
||
"""I'm just a string so should be followed by 2 newlines.""" | ||
|
||
|
||
b = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# flags: --preview | ||
"""I am a very helpful module docstring. | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, | ||
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | ||
Ut enim ad minim veniam, | ||
quis nostrud exercitation ullamco laboris | ||
nisi ut aliquip ex ea commodo consequat. | ||
Duis aute irure dolor in reprehenderit in voluptate | ||
velit esse cillum dolore eu fugiat nulla pariatur. | ||
Excepteur sint occaecat cupidatat non proident, | ||
sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
""" | ||
|
||
|
||
|
||
|
||
a = 1 | ||
|
||
|
||
"""Look at me I'm a docstring... | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
........................................................NOT! | ||
""" | ||
|
||
|
||
|
||
|
||
b = 2 | ||
|
||
# output | ||
"""I am a very helpful module docstring. | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, | ||
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | ||
Ut enim ad minim veniam, | ||
quis nostrud exercitation ullamco laboris | ||
nisi ut aliquip ex ea commodo consequat. | ||
Duis aute irure dolor in reprehenderit in voluptate | ||
velit esse cillum dolore eu fugiat nulla pariatur. | ||
Excepteur sint occaecat cupidatat non proident, | ||
sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
""" | ||
|
||
a = 1 | ||
|
||
|
||
"""Look at me I'm a docstring... | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
............................................................ | ||
........................................................NOT! | ||
""" | ||
|
||
|
||
b = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# flags: --preview | ||
"""Single line module-level docstring should be followed by single newline.""" | ||
a = 1 | ||
|
||
# output | ||
"""Single line module-level docstring should be followed by single newline.""" | ||
|
||
a = 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# flags: --preview | ||
"""Single line module-level docstring should be followed by single newline.""" | ||
|
||
a = 1 | ||
|
||
# output | ||
"""Single line module-level docstring should be followed by single newline.""" | ||
|
||
a = 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
'''''' | ||
|
||
'\'' | ||
'"' | ||
"'" | ||
|
@@ -59,6 +60,7 @@ | |
# output | ||
|
||
"""""" | ||
|
||
"'" | ||
'"' | ||
"'" | ||
|