File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1212- Fix crash while formatting a long ` del ` statement containing tuples (#4628 )
1313- Fix crash while formatting expressions using the walrus operator in complex
1414 ` with ` statements (#4630 )
15+ - Handle ` # fmt: skip ` followed by a comment at the end of file (#4635 )
1516
1617### Preview style
1718
Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ def _generate_ignored_nodes_from_fmt_skip(
321321 if not comments or comment .value != comments [0 ].value :
322322 return
323323 if prev_sibling is not None :
324- leaf .prefix = ""
324+ leaf .prefix = leaf . prefix [ comment . consumed :]
325325
326326 if Preview .fix_fmt_skip_in_one_liners not in mode :
327327 siblings = [prev_sibling ]
Original file line number Diff line number Diff line change 1+ def foo ():
2+ pass
3+
4+
5+ # comment 1 # fmt: skip
6+ # comment 2
You can’t perform that action at this time.
0 commit comments