Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1310)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py

Issue 1839193004: Run auto-formatter (autopep8) on webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py
index 0ac1e8d586a851bf7ce68e7c43b68506c40cf3e1..c2bf421fd02364c2910bd46334ba6fd0f181ed85 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py
@@ -41,6 +41,7 @@ _log = logging.getLogger(__name__)
class AmbiguousCommitError(Exception):
+
def __init__(self, num_local_commits, has_working_directory_changes):
Exception.__init__(self, "Found %s local commits and the working directory is %s" % (
num_local_commits, ["clean", "not clean"][has_working_directory_changes]))
@@ -164,7 +165,8 @@ class Git(SCM):
def changed_files(self, git_commit=None):
# FIXME: --diff-filter could be used to avoid the "extract_filenames" step.
- status_command = [self.executable_name, 'diff', '-r', '--name-status', "--no-renames", "--no-ext-diff", "--full-index", self._merge_base(git_commit)]
+ status_command = [self.executable_name, 'diff', '-r', '--name-status',
+ "--no-renames", "--no-ext-diff", "--full-index", self._merge_base(git_commit)]
# FIXME: I'm not sure we're returning the same set of files that SVN.changed_files is.
# Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R)
return self._run_status_and_extract_filenames(status_command, self._status_regexp("ADM"))
@@ -212,7 +214,8 @@ class Git(SCM):
int(match.group(4)), int(match.group(5)), int(match.group(6)), 0)
sign = 1 if match.group(7) == '+' else -1
- time_without_timezone = time_with_timezone - datetime.timedelta(hours=sign * int(match.group(8)), minutes=int(match.group(9)))
+ time_without_timezone = time_with_timezone - \
+ datetime.timedelta(hours=sign * int(match.group(8)), minutes=int(match.group(9)))
return time_without_timezone.strftime('%Y-%m-%dT%H:%M:%SZ')
def create_patch(self, git_commit=None, changed_files=None):
@@ -228,7 +231,8 @@ class Git(SCM):
if self._filesystem.exists(order_file):
order = "-O%s" % order_file
- command = [self.executable_name, 'diff', '--binary', '--no-color', "--no-ext-diff", "--full-index", "--no-renames", order, self._merge_base(git_commit), "--"]
+ command = [self.executable_name, 'diff', '--binary', '--no-color', "--no-ext-diff",
+ "--full-index", "--no-renames", order, self._merge_base(git_commit), "--"]
if changed_files:
command += changed_files
return self._run(command, decode_output=False, cwd=self.checkout_root)

Powered by Google App Engine
This is Rietveld 408576698