Skip to content

Commit

Permalink
Add test for #1187 (#4559)
Browse files Browse the repository at this point in the history
Closes #1187
  • Loading branch information
MeGaGiGaGon authored Jan 24, 2025
1 parent 1455ae4 commit e58baf1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/data/cases/prefer_rhs_split_reformatted.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
# exactly line length limit + 1, it won't be split like that.
xxxxxxxxx_yyy_zzzzzzzz[xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)] = 1

# Regression test for #1187
print(
dict(
a=1,
b=2 if some_kind_of_data is not None else some_other_kind_of_data, # some explanation of why this is actually necessary
c=3,
)
)

# output

Expand All @@ -36,3 +44,14 @@
xxxxxxxxx_yyy_zzzzzzzz[
xx.xxxxxx(x_yyy_zzzzzz.xxxxx[0]), x_yyy_zzzzzz.xxxxxx(xxxx=1)
] = 1

# Regression test for #1187
print(
dict(
a=1,
b=(
2 if some_kind_of_data is not None else some_other_kind_of_data
), # some explanation of why this is actually necessary
c=3,
)
)

0 comments on commit e58baf1

Please sign in to comment.