File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -572,14 +572,12 @@ def SurroundedByParens(token):
572
572
# length because we might wrap after it
573
573
next_token = ending .next_token
574
574
prev_token = opening .previous_token
575
- if split_before :
576
- if prev_token :
577
- clause_start = _PrevLogicalClause (prev_token )
578
- length += opening .total_length - clause_start .total_length
579
- else :
580
- if next_token :
581
- clause_end = _NextLogicalClause (next_token )
582
- length += clause_end .total_length - ending .total_length
575
+ if split_before and prev_token :
576
+ clause_start = _PrevLogicalClause (prev_token )
577
+ length += opening .total_length - clause_start .total_length
578
+ elif not split_before and next_token
579
+ clause_end = _NextLogicalClause (next_token )
580
+ length += clause_end .total_length - ending .total_length
583
581
else :
584
582
end_token = _LastTokenInLine (check_token )
585
583
length = end_token .total_length + self .stack [- 1 ].indent
You can’t perform that action at this time.
0 commit comments