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 @@ -561,14 +561,12 @@ def SurroundedByParens(token):
561561 # length because we might wrap after it
562562 next_token = ending .next_token
563563 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
572570 else :
573571 end_token = _LastTokenInLine (check_token )
574572 length = end_token .total_length + self .stack [- 1 ].indent
You can’t perform that action at this time.
0 commit comments