diff --git a/script/lint.js b/script/lint.js index 5e7489ee8ddd..6cfb8143cd08 100755 --- a/script/lint.js +++ b/script/lint.js @@ -103,7 +103,7 @@ const LINTERS = [{ const rcfile = path.join(DEPOT_TOOLS, 'pylintrc'); const args = ['--rcfile=' + rcfile, ...filenames]; const env = Object.assign({ PYTHONPATH: path.join(ELECTRON_ROOT, 'script') }, process.env); - spawnAndCheckExitCode('pylint', args, { env }); + spawnAndCheckExitCode('pylint-2.7', args, { env }); } }, { key: 'javascript', diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 2cec0ff8dabe..88fbcc242377 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -208,6 +208,7 @@ def zero_zip_date_time(fname): with open(fname, 'r+b') as f: _zero_zip_date_time(f) except Exception: + # pylint: disable=W0707 raise NonZipFileError(fname) diff --git a/script/run-clang-format.py b/script/run-clang-format.py index b7817bb32c61..a8d43e08ba83 100644 --- a/script/run-clang-format.py +++ b/script/run-clang-format.py @@ -78,12 +78,14 @@ def make_diff(diff_file, original, reformatted): class DiffError(Exception): def __init__(self, message, errs=None): + # pylint: disable=R1725 super(DiffError, self).__init__(message) self.errs = errs or [] class UnexpectedError(Exception): def __init__(self, message, exc=None): + # pylint: disable=R1725 super(UnexpectedError, self).__init__(message) self.formatted_traceback = traceback.format_exc() self.exc = exc @@ -96,6 +98,7 @@ def run_clang_format_diff_wrapper(args, file_name): except DiffError: raise except Exception as e: + # pylint: disable=W0707 raise UnexpectedError('{}: {}: {}'.format( file_name, e.__class__.__name__, e), e) @@ -105,6 +108,7 @@ def run_clang_format_diff(args, file_name): with io.open(file_name, 'r', encoding='utf-8') as f: original = f.readlines() except IOError as exc: + # pylint: disable=W0707 raise DiffError(str(exc)) invocation = [args.clang_format_executable, file_name] if args.fix: @@ -117,6 +121,7 @@ def run_clang_format_diff(args, file_name): universal_newlines=True, shell=True) except OSError as exc: + # pylint: disable=W0707 raise DiffError(str(exc)) proc_stdout = proc.stdout proc_stderr = proc.stderr