diff --git a/tests/data/cases/prefer_rhs_split_reformatted.py b/tests/data/cases/prefer_rhs_split_reformatted.py index e15e5dd..2ec0728 100644 --- a/tests/data/cases/prefer_rhs_split_reformatted.py +++ b/tests/data/cases/prefer_rhs_split_reformatted.py @@ -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 @@ -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, + ) +)