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

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

Issue 2130093003: Fix pylint warnings in webkitpy/common/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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/scm.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
index 4778916e01ac62122bbcfff835e15ecfad6740e3..b64ee86cd8a58ad0593075c6d21b6cfd96642616 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
@@ -34,14 +34,13 @@ import re
import sys
from webkitpy.common.system.executive import Executive
-from webkitpy.common.system.executive import ScriptError
from webkitpy.common.system.filesystem import FileSystem
_log = logging.getLogger(__name__)
# SCM methods are expected to return paths relative to self.checkout_root.
-class SCM:
+class SCM(object):
def __init__(self, cwd, executive=None, filesystem=None):
self.cwd = cwd
@@ -50,11 +49,12 @@ class SCM:
self.checkout_root = self.find_checkout_root(self.cwd)
# A wrapper used by subclasses to create processes.
- def _run(self, args, cwd=None, input=None, error_handler=None, return_exit_code=False, return_stderr=True, decode_output=True):
+ def _run(self, args, cwd=None, input_func=None, error_handler=None,
+ return_exit_code=False, return_stderr=True, decode_output=True):
# FIXME: We should set cwd appropriately.
return self._executive.run_command(args,
cwd=cwd,
- input=input,
+ input_func=input_func,
error_handler=error_handler,
return_exit_code=return_exit_code,
return_stderr=return_stderr,
@@ -81,6 +81,10 @@ class SCM:
def _subclass_must_implement():
raise NotImplementedError("subclasses must implement")
+ # Most methods here are abstract methods which don't use their arguments.
+ # FIXME: Merge Git and SCM and remove the abstract base methods.
+ # pylint: disable=unused-argument
+
@classmethod
def in_working_directory(cls, path, executive=None):
SCM._subclass_must_implement()

Powered by Google App Engine
This is Rietveld 408576698