You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_tools/third_party/pylint
Ned Nguyen 807abf149a Revert "pylint: upgrade to 1.5.6"
This reverts commit 3899f1bcce.

Reason for revert: causing PRESUBMIT error on catapult repo 

BUG:chromium:865897

Original change's description:
> pylint: upgrade to 1.5.6
> 
> We disable new warnings that are triggered in depot_tools to pylintrc.
> So the lint output before & after this CL are mostly unchanged.  The
> repos checked: depot_tools, src, and build.
> 
> Also update astroid to 1.4.9 and drop logilab.common as needed.
> 
> Bug: 863669
> Change-Id: Ib602560c1bcad5a9e8b6ca731d9465f43220f044
> Reviewed-on: https://chromium-review.googlesource.com/1137382
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Mike Frysinger <vapier@chromium.org>

TBR=vapier@chromium.org,iannucci@chromium.org,jbudorick@chromium.org

Change-Id: I8ea087123db4e52fdf7ebff8b1ed356fd60a6059
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 863669
Reviewed-on: https://chromium-review.googlesource.com/1145160
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Commit-Queue: Ned Nguyen <nednguyen@google.com>
7 years ago
..
checkers Revert "pylint: upgrade to 1.5.6" 7 years ago
pyreverse Revert "pylint: upgrade to 1.5.6" 7 years ago
reporters Revert "pylint: upgrade to 1.5.6" 7 years ago
LICENSE.txt
README.chromium Revert "pylint: upgrade to 1.5.6" 7 years ago
__init__.py
__main__.py
__pkginfo__.py Revert "pylint: upgrade to 1.5.6" 7 years ago
config.py Revert "pylint: upgrade to 1.5.6" 7 years ago
epylint.py Revert "pylint: upgrade to 1.5.6" 7 years ago
gui.py Revert "pylint: upgrade to 1.5.6" 7 years ago
interfaces.py Revert "pylint: upgrade to 1.5.6" 7 years ago
lint.py Revert "pylint: upgrade to 1.5.6" 7 years ago
testutils.py Revert "pylint: upgrade to 1.5.6" 7 years ago
utils.py Revert "pylint: upgrade to 1.5.6" 7 years ago

README.chromium

URL: https://www.pylint.org/
Version: 1.4.5
License: GPL
License File: LICENSE.txt

Description:
This directory contains the pylint module.

Local Modifications:
- applied upstream fix https://bitbucket.org/logilab/pylint/commits/5df347467ee0
- applied fix to work around bad interaction between sys.path manipulation in
  pylint itself and multiprocessing's implementation on Windows (DIFF1)


Diffs:
DIFF1
diff --git a/third_party/pylint/lint.py b/third_party/pylint/lint.py
index e10ae56..082d8b3 100644
--- a/third_party/pylint/lint.py
+++ b/third_party/pylint/lint.py
@@ -671,7 +671,8 @@ class PyLinter(configuration.OptionsManagerMixIn,
             files_or_modules = (files_or_modules,)

         if self.config.jobs == 1:
-            self._do_check(files_or_modules)
+            with fix_import_path(files_or_modules):
+                self._do_check(files_or_modules)
         else:
             # Hack that permits running pylint, on Windows, with -m switch
             # and with --jobs, as in 'python -2 -m pylint .. --jobs'.
@@ -1252,8 +1253,8 @@ group are mutually exclusive.'),

         # insert current working directory to the python path to have a correct
         # behaviour
-        with fix_import_path(args):
-            if self.linter.config.profile:
+        if self.linter.config.profile:
+            with fix_import_path(args):
                 print('** profiled run', file=sys.stderr)
                 import cProfile, pstats
                 cProfile.runctx('linter.check(%r)' % args, globals(), locals(),
@@ -1262,9 +1263,9 @@ group are mutually exclusive.'),
                 data.strip_dirs()
                 data.sort_stats('time', 'calls')
                 data.print_stats(30)
-            else:
-                linter.check(args)
-            linter.generate_reports()
+        else:
+            linter.check(args)
+        linter.generate_reports()
         if exit:
             sys.exit(self.linter.msg_status)