Skip to content

Commit

Permalink
Check for None before accessing 'tok'
Browse files Browse the repository at this point in the history
  • Loading branch information
bwendling committed Apr 26, 2017
1 parent 251c5f1 commit c2a933e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yapf/yapflib/format_decision_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def MustSplit(self):
tok = current.next_token
while tok and (tok.is_name or tok.value == '.'):
tok = tok.next_token
func_call_or_string_format = tok.value == '('
func_call_or_string_format = tok and tok.value == '('
elif current.is_string:
tok = current.next_token
while tok and tok.is_string:
Expand Down

0 comments on commit c2a933e

Please sign in to comment.