Skip to content

Commit

Permalink
Replace if statement with if expression
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Jul 12, 2021
1 parent bcb5081 commit 4230419
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions yapf/yapflib/object_state.py
Expand Up @@ -212,10 +212,7 @@ def has_default_value(self):
while tok != self.last_token:
if format_token.Subtype.DEFAULT_OR_NAMED_ASSIGN in tok.subtypes:
return True
if tok.OpensScope():
tok = tok.matching_bracket
else:
tok = tok.next_token
tok = tok.matching_bracket if tok.OpensScope() else tok.next_token
return False

def Clone(self):
Expand Down

0 comments on commit 4230419

Please sign in to comment.