@@ -504,10 +504,10 @@ def SurroundedByParens(token):
504504 (opening .matching_bracket .next_token and
505505 opening .matching_bracket .next_token .value != ',' and
506506 not opening .matching_bracket .next_token .ClosesScope ())):
507- argLengths = _CalculateArgLengths (opening )
508- startCol = self .column + len (current .value ) + len (opening .value )
509- for length in argLengths :
510- length += startCol
507+ arg_lengths = _CalculateArgLengths (opening )
508+ start_col = self .column + len (current .value ) + len (opening .value )
509+ for length in arg_lengths :
510+ length += start_col
511511 if length > self .column_limit :
512512 return True
513513
@@ -1203,37 +1203,37 @@ def _ScopeHasNoCommas(token):
12031203
12041204def _CalculateArgLengths (opening ):
12051205 """Calculate the length of each function arg, if the args are wrapped"""
1206- argList = list ()
1206+ arg_list = list ()
12071207 token = opening .next_token
1208- shortList = list ()
1209- deltaList = list ()
1208+ short_list = list ()
1209+ delta_list = list ()
12101210 delta = 0
12111211 while token :
1212- shortList .append (token )
1212+ short_list .append (token )
12131213 if token .name == "COMMA" :
1214- argList .append (shortList )
1215- deltaList .append (delta )
1216- shortList = list ()
1214+ arg_list .append (short_list )
1215+ delta_list .append (delta )
1216+ short_list = list ()
12171217 delta = 0
12181218 elif token .name == "LPAR" :
12191219 if _IsFunctionCallWithArguments (token .previous_token ):
1220- maxArg = max (_CalculateArgLengths (token ))
1221- endToken = token .matching_bracket
1222- innerLength = endToken .total_length - token .total_length
1223- delta = innerLength - maxArg
1220+ max_arg = max (_CalculateArgLengths (token ))
1221+ end_token = token .matching_bracket
1222+ inner_length = end_token .total_length - token .total_length
1223+ delta = inner_length - max_arg
12241224 token = token .matching_bracket
1225- shortList .append (token )
1225+ short_list .append (token )
12261226 elif token .name == "RPAR" :
1227- argList .append (shortList )
1228- deltaList .append (delta )
1227+ arg_list .append (short_list )
1228+ delta_list .append (delta )
12291229 break
12301230 token = token .next_token
12311231
1232- argLengths = list ()
1233- for l , d in zip (argList , deltaList ):
1234- argLen = l [- 1 ].total_length - l [0 ].total_length + len (l [0 ].value ) - d
1235- argLengths .append (argLen )
1236- return argLengths
1232+ arg_lengths = list ()
1233+ for l , d in zip (arg_list , delta_list ):
1234+ arg_len = l [- 1 ].total_length - l [0 ].total_length + len (l [0 ].value ) - d
1235+ arg_lengths .append (arg_len )
1236+ return arg_lengths
12371237
12381238
12391239class _ParenState (object ):
0 commit comments