-
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.
fix: Don't move comments while splitting delimiters (#4248)
Signed-off-by: RedGuy12 <[email protected]>
- Loading branch information
Showing
3 changed files
with
75 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
a = ( | ||
1 + # type: ignore | ||
2 # type: ignore | ||
) | ||
a = ( | ||
1 # type: ignore | ||
+ 2 # type: ignore | ||
) | ||
bad_split3 = ( | ||
"What if we have inline comments on " # First Comment | ||
"each line of a bad split? In that " # Second Comment | ||
"case, we should just leave it alone." # Third Comment | ||
) | ||
parametrize( | ||
( | ||
{}, | ||
{}, | ||
), | ||
( # foobar | ||
{}, | ||
{}, | ||
), | ||
) | ||
|
||
|
||
|
||
# output | ||
a = ( | ||
1 # type: ignore | ||
+ 2 # type: ignore | ||
) | ||
a = ( | ||
1 # type: ignore | ||
+ 2 # type: ignore | ||
) | ||
bad_split3 = ( | ||
"What if we have inline comments on " # First Comment | ||
"each line of a bad split? In that " # Second Comment | ||
"case, we should just leave it alone." # Third Comment | ||
) | ||
parametrize( | ||
( | ||
{}, | ||
{}, | ||
), | ||
( # foobar | ||
{}, | ||
{}, | ||
), | ||
) | ||
|