Skip to content

Commit e58baf1

Browse files
authored
Add test for #1187 (#4559)
Closes #1187
1 parent 1455ae4 commit e58baf1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/data/cases/prefer_rhs_split_reformatted.py

+19
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
# exactly line length limit + 1, it won't be split like that.
1212
xxxxxxxxx_yyy_zzzzzzzz[xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)] = 1
1313

14+
# Regression test for #1187
15+
print(
16+
dict(
17+
a=1,
18+
b=2 if some_kind_of_data is not None else some_other_kind_of_data, # some explanation of why this is actually necessary
19+
c=3,
20+
)
21+
)
1422

1523
# output
1624

@@ -36,3 +44,14 @@
3644
xxxxxxxxx_yyy_zzzzzzzz[
3745
xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)
3846
] = 1
47+
48+
# Regression test for #1187
49+
print(
50+
dict(
51+
a=1,
52+
b=(
53+
2 if some_kind_of_data is not None else some_other_kind_of_data
54+
), # some explanation of why this is actually necessary
55+
c=3,
56+
)
57+
)

0 commit comments

Comments
 (0)