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

Side by Side Diff: third_party/pylint/README.chromium

Issue 1208743002: Changes to improve multiprocessing PRESUBMIT support in Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix tests Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 URL: http://www.pylint.org/ 1 URL: http://www.pylint.org/
2 Version: 1.4.1 2 Version: 1.4.1
3 License: GPL 3 License: GPL
4 License File: LICENSE.txt 4 License File: LICENSE.txt
5 5
6 Description: 6 Description:
7 This directory contains the pylint module. 7 This directory contains the pylint module.
8 8
9 Local Modifications: 9 Local Modifications:
10 - applied upstream fix https://bitbucket.org/logilab/pylint/commits/5df347467ee0 10 - applied upstream fix https://bitbucket.org/logilab/pylint/commits/5df347467ee0
11 - applied fix to work around bad interaction between sys.path manipulation in
12 pylint itself and multiprocessing's implementation on Windows (DIFF1)
13
14
15 Diffs:
16 DIFF1
17 diff --git a/third_party/pylint/lint.py b/third_party/pylint/lint.py
18 index e10ae56..082d8b3 100644
19 --- a/third_party/pylint/lint.py
20 +++ b/third_party/pylint/lint.py
21 @@ -671,7 +671,8 @@ class PyLinter(configuration.OptionsManagerMixIn,
22 files_or_modules = (files_or_modules,)
23
24 if self.config.jobs == 1:
25 - self._do_check(files_or_modules)
26 + with fix_import_path(files_or_modules):
27 + self._do_check(files_or_modules)
28 else:
29 # Hack that permits running pylint, on Windows, with -m switch
30 # and with --jobs, as in 'python -2 -m pylint .. --jobs'.
31 @@ -1252,8 +1253,8 @@ group are mutually exclusive.'),
32
33 # insert current working directory to the python path to have a correct
34 # behaviour
35 - with fix_import_path(args):
36 - if self.linter.config.profile:
37 + if self.linter.config.profile:
38 + with fix_import_path(args):
39 print('** profiled run', file=sys.stderr)
40 import cProfile, pstats
41 cProfile.runctx('linter.check(%r)' % args, globals(), locals(),
42 @@ -1262,9 +1263,9 @@ group are mutually exclusive.'),
43 data.strip_dirs()
44 data.sort_stats('time', 'calls')
45 data.print_stats(30)
46 - else:
47 - linter.check(args)
48 - linter.generate_reports()
49 + else:
50 + linter.check(args)
51 + linter.generate_reports()
52 if exit:
53 sys.exit(self.linter.msg_status)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698