This repository was archived by the owner on Jul 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,11 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md).
272
272
* if top level functions were separated by a comment, don't put four
273
273
empty lines after the upper function
274
274
275
+ * fixed unstable formatting of newlines with imports
276
+
277
+ * fixed unintentional folding of post scriptum standalone comments
278
+ into last statement if it was a simple statement (#18 , #28 )
279
+
275
280
* fixed missing space in numpy-style array indexing (#33 )
276
281
277
282
* fixed spurious space after star-based unary expressions (#31 )
Original file line number Diff line number Diff line change @@ -1115,7 +1115,7 @@ def generate_comments(leaf: Leaf) -> Iterator[Leaf]:
1115
1115
if content and (content [0 ] not in {' ' , '!' , '#' }):
1116
1116
content = ' ' + content
1117
1117
is_standalone_comment = (
1118
- '\n ' in before_comment or '\n ' in content or leaf .type == token .DEDENT
1118
+ '\n ' in before_comment or '\n ' in content or leaf .type == token .ENDMARKER
1119
1119
)
1120
1120
if not is_standalone_comment :
1121
1121
# simple trailing comment
Original file line number Diff line number Diff line change @@ -124,6 +124,9 @@ async def f():
124
124
signal .getsignal (signal .SIGINT ) != signal .default_int_handler
125
125
):
126
126
return True
127
+ last_call ()
128
+ # standalone comment at ENDMARKER
129
+
127
130
128
131
# output
129
132
@@ -275,3 +278,6 @@ async def f():
275
278
or signal .getsignal (signal .SIGINT ) != signal .default_int_handler
276
279
):
277
280
return True
281
+
282
+ last_call ()
283
+ # standalone comment at ENDMARKER
You can’t perform that action at this time.
0 commit comments