File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -561,14 +561,12 @@ def SurroundedByParens(token):
561
561
# length because we might wrap after it
562
562
next_token = ending .next_token
563
563
prev_token = opening .previous_token
564
- if split_before :
565
- if prev_token :
566
- clause_start = _PrevLogicalClause (prev_token )
567
- length += opening .total_length - clause_start .total_length
568
- else :
569
- if next_token :
570
- clause_end = _NextLogicalClause (next_token )
571
- length += clause_end .total_length - ending .total_length
564
+ if split_before and prev_token :
565
+ clause_start = _PrevLogicalClause (prev_token )
566
+ length += opening .total_length - clause_start .total_length
567
+ elif not split_before and next_token
568
+ clause_end = _NextLogicalClause (next_token )
569
+ length += clause_end .total_length - ending .total_length
572
570
else :
573
571
end_token = _LastTokenInLine (check_token )
574
572
length = end_token .total_length + self .stack [- 1 ].indent
You can’t perform that action at this time.
0 commit comments