Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
bwendling committed Jan 23, 2021
1 parent c578dc4 commit 7fed727
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions yapf/yapflib/format_decision_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,8 @@ def MoveStateToNextToken(self):

# Calculate the penalty for overflowing the column limit.
penalty = 0
if (not current.is_pylint_comment and not current.is_pytype_comment
and not current.is_copybara_comment and self.column > self.column_limit):
if (not current.is_pylint_comment and not current.is_pytype_comment and
not current.is_copybara_comment and self.column > self.column_limit):
excess_characters = self.column - self.column_limit
penalty += style.Get('SPLIT_PENALTY_EXCESS_CHARACTER') * excess_characters

Expand Down
4 changes: 2 additions & 2 deletions yapf/yapflib/reformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ def _CanPlaceOnSingleLine(uwline):
indent_amt = style.Get('INDENT_WIDTH') * uwline.depth
last = uwline.last
last_index = -1
if (last.is_pylint_comment or last.is_pytype_comment
or last.is_copybara_comment):
if (last.is_pylint_comment or last.is_pytype_comment or
last.is_copybara_comment):
last = last.previous_token
last_index = -2
if last is None:
Expand Down

0 comments on commit 7fed727

Please sign in to comment.