black/tests/data/cases/split_delimiter_comments.py
cobalt e4bfedbec2
fix: Don't move comments while splitting delimiters (#4248)
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
2024-03-01 07:02:56 -08:00

52 lines
817 B
Python

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
{},
{},
),
)