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

Side by Side Diff: third_party/pylint.py

Issue 707353002: pylint: upgrade to 1.3.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # This program is free software; you can redistribute it and/or modify it under 2 # This program is free software; you can redistribute it and/or modify it under
3 # the terms of the GNU General Public License as published by the Free Software 3 # the terms of the GNU General Public License as published by the Free Software
4 # Foundation; either version 2 of the License, or (at your option) any later 4 # Foundation; either version 2 of the License, or (at your option) any later
5 # version. 5 # version.
6 # 6 #
7 # This program is distributed in the hope that it will be useful, but WITHOUT 7 # This program is distributed in the hope that it will be useful, but WITHOUT
8 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 8 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details 9 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
10 # 10 #
11 # You should have received a copy of the GNU General Public License along with 11 # You should have received a copy of the GNU General Public License along with
12 # this program; if not, write to the Free Software Foundation, Inc., 12 # this program; if not, write to the Free Software Foundation, Inc.,
13 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 13 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
14 """ Copyright (c) 2002-2008 LOGILAB S.A. (Paris, FRANCE). 14 """ Copyright (c) 2002-2008 LOGILAB S.A. (Paris, FRANCE).
15 http://www.logilab.fr/ -- mailto:contact@logilab.fr 15 http://www.logilab.fr/ -- mailto:contact@logilab.fr
16 16
17 Copyright (c) 2012 The Chromium Authors. All rights reserved. 17 Copyright (c) 2012 The Chromium Authors. All rights reserved.
18 """ 18 """
19 import os
19 import sys 20 import sys
21
22 # Add local modules to the search path.
23 sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(
24 __file__)), 'logilab'))
M-A Ruel 2014/11/18 13:36:06 I see from logilab.<...> in the files, which files
vapier 2014/11/18 18:38:35 pylint imports astroid directly now
25 sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(
26 __file__)), 'six'))
M-A Ruel 2014/11/18 13:36:06 This could be fixed by renaming six.py to __init__
vapier 2014/11/18 18:38:35 done
27
20 from pylint import lint 28 from pylint import lint
21 29
22 args = sys.argv[1:] 30 args = sys.argv[1:]
23 31
24 # Add support for a custom mode where arguments are fed line by line on 32 # Add support for a custom mode where arguments are fed line by line on
25 # stdin. This allows us to get around command line length limitations. 33 # stdin. This allows us to get around command line length limitations.
26 ARGS_ON_STDIN = '--args-on-stdin' 34 ARGS_ON_STDIN = '--args-on-stdin'
27 if ARGS_ON_STDIN in args: 35 if ARGS_ON_STDIN in args:
28 args = [arg for arg in args if arg != ARGS_ON_STDIN] 36 args = [arg for arg in args if arg != ARGS_ON_STDIN]
29 args.extend(arg.strip() for arg in sys.stdin) 37 args.extend(arg.strip() for arg in sys.stdin)
30 38
31 lint.Run(args) 39 lint.Run(args)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698