Commit Graph

34 Commits (39120911526720e9256b724b1f44513bab3cb533)

Author SHA1 Message Date
Ayu Ishii 0985861970 CodeInclusion: Rename whitelist/blacklist -> allowlist/blocklist
Migrate to more inclusive terminology.

Bug: 1097674
Change-Id: I387b385ff36c7766682c06af34ed5fc6115119d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2268403
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
5 years ago
Mike Frysinger 198b562986 pylint: make pylint-quotes available
We load it, but disable all the warnings by default.  People can
re-enable the warnings for their modules if they want, but there
is way too much broken code in the tree currently.

Bug: 738534
Test: ran each pylint version by hand on some bad code
Change-Id: Ia5b24093f18febd452f4c1eed6e82044544161bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1958849
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
5 years ago
Mike Frysinger ed485e1994 pylintrc: disable score reports
Pylint-1.7+ include a score report by default at the end of every
module lint.  We disable reports in general, so silence this too.

Bug: 866772
Change-Id: Ie3df44c80b90daa59e46c8fd37a949176c9b09a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1770420
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
6 years ago
Mike Frysinger 862370c608 pylint: reland upgrade to 1.5.6
** WARNING: please do not revert this CL without checking with vapier@ first ***

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 its deps along the way:
- Update astroid to 1.4.9.
- Drop now unused logilab.common.
- Import lazy_object_proxy 1.3.1.
- Import wrapt 1.10.11.

This should address the issue where some Chromium bots don't have the
lazy_object_proxy/wrapt python modules installed.  These have optional
C modules that we don't compile either as they have Python fallbacks.

Bug: 863669
Change-Id: Iade0e6d89598e2c836ed647996f43db356c43cd0
Reviewed-on: https://chromium-review.googlesource.com/1145485
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
7 years ago
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
Mike Frysinger 3899f1bcce 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>
7 years ago
Quinten Yearsley b2cc4a94da depot_tools: Replace pylint error numbers with symbolic names.
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.

The purpose is to slightly improve readability of pylint
disable comments.

Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
8 years ago
vapier@chromium.org e3b32af9fe Revert "Revert "pylint: upgrade to 1.3.1""
The reason cited for reverting was invalid, so reland the update.

BUG=chromium:431514

Review URL: https://codereview.chromium.org/739393004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293049 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
smut@google.com 9fccbfe4d1 Revert "pylint: upgrade to 1.3.1"
This reverts commit e642ee868c.

Conflicts:
	pylintrc

Reason:
	All repos are borked.

TBR=vapier

Review URL: https://codereview.chromium.org/741023003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293042 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vapier@chromium.org cdbd936c47 disable new pylint warnings
People are just ignoring these and bypassing the presubmit entirely, so
disable all the warnings until someone feels like shaving these yaks one
by one.

BUG=chromium:431514
TEST=ran presubmit on build/ and so no more warnings

Review URL: https://codereview.chromium.org/721833003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292997 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vapier@chromium.org e642ee868c pylint: upgrade to 1.3.1
The current pylint is very old at this point.  Pull in the latest version
as it supports a lot more features.  Also need to fix the pylint wrapper
to actually update sys.path to use the local modules.

We include the six module since not all bots have it, and it's small.

This will trigger new warnings in files, but they look like legitimate
issues that should be fixed at some point.

BUG=chromium:431514
TEST=ran on some code bases and checked output

Review URL: https://codereview.chromium.org/741503002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292988 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
kbr@chromium.org 8a57ce17e3 Revert "pylint: upgrade to 1.3.1"
This reverts commit 451939d582.

Throws an exception with a missing import, breaking Telemetry's
presubmit checks and presumably presubmit checks for all Python files
in Chromium. See comment on https://codereview.chromium.org/707353002/ .

BUG=chromium:431514

Review URL: https://codereview.chromium.org/719313003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292955 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vapier@chromium.org 451939d582 pylint: upgrade to 1.3.1
The current pylint is very old at this point.  Pull in the latest version
as it supports a lot more features.  Also need to fix the pylint wrapper
to actually update sys.path to use the local modules.

This will trigger new warnings in files, but they look like legitimate
issues that should be fixed at some point.

BUG=chromium:431514
TEST=ran on some code bases and checked output

Review URL: https://codereview.chromium.org/707353002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292954 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org 6f848035ec Add multiprocessing.managers.SyncManager to pylintrc generated-members
Because it's generated :)


R=maruel@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/11439022

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@171518 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 90d6388861 Add google.appengine.api.memcache to pylint ignored list
It's member are generated and confuse pylint.

TBR=cmp@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/10169032

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133719 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org ff9a217e26 Add disabled_warnings arg to RunPylint() and use the default pylintrc file by default.
Update pylintrc to be near the pylint 0.25.1 default file.

R=cmp@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/10199016

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133707 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org a9eeeee9fe Remove E1101 errors generated by colorama.AnsiCodes.
Pylint fails to parse generated members in a __init__() function.

R=cmp@chromium.org
BUG=
TEST=Manually tested on linux, cygwin and windows


Review URL: http://codereview.chromium.org/10202010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133705 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 0927b7eef8 Create a new testing_support module to move utility modules there
It will simplify importing utility modules from other projects. Otherwise I was getting name conflicts with 'test'.

Reenable W0403 that was disabled in the previous CL.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8508015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109636 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 428342a0a7 Standardize the sys.path fix up and fix a few pylint warnings.
Disable temporarily W0403, will be reenabled on the next CL

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8508017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109435 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org ce71e67b93 Improve pylint error message with an old version is used.
Instead of crashing, prints an error message.

BUG=
TEST=


Review URL: http://codereview.chromium.org/8363030

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106867 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org da78c6f1b6 Reapply r106708 "Include initial use of colorama"
isatty() wasn't defined on Windows, causing it to crash.

R=dpranke@chromium.org
BUG=
TEST=manually gclient sync on windows


Review URL: http://codereview.chromium.org/8371006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106865 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org d8aba2cea8 Revert "Include initial use of colorama"
Crashes.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106709 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 037bd18864 Include initial use of colorama
For now only affect gclient help to figure out if there is any issue with it.

Because of the way it's done, there is no way to disable coloring, which could
be annoying when redirected. This needs to be taken in consideration.

R=dpranke@chromium.org
TEST=manually tested on linux, cygwin and windows, both run manually and
redirected to a text file.
BUG=


Review URL: http://codereview.chromium.org/8365001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106708 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 891f6454c9 Fix support for pylint 0.24.
TBR=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7487001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@93451 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b3727a36e4 Move patch.py and rietveld.py from commit-queue.
It will be used for:
- git cl patch so binary files can be patched
- try jobs instead of doing a curl <url> | patch

BUG=
TEST=

Review URL: http://codereview.chromium.org/6792028

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80355 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org cdbecc49e9 Improve tests to support more git versions and different outputs.
Disable warning W0404 in pylint.

BUG=none
TEST=should now work on googlers workstations

Review URL: http://codereview.chromium.org/6456010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74242 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4c6f18ca9e Silence pylint warnings.
TBR=dpranke
BUG=
TEST=

Review URL: http://codereview.chromium.org/6051004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69848 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org bf38a7ed53 Enhance RunPylint to use white_list and black_list arguments.
Change RunPylint to parse all .py files when one is modified.

Make all depot_tools/tests pass on pylint. That mostly meant fixing some
builtins aliasing, wrong alignment and turning off most remaining warnings.

BUG=none
TEST=unit tests

Review URL: http://codereview.chromium.org/5695007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69159 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1bd1ed3cc6 Add more exception information to breakpad.
When an HTTP exception information is logged, no information is sent by
default. Add an helper function to manually extract interesting information
to append it to the exception type.

Also disable another pylint warning.

TEST=manual test
BUG=none

Review URL: http://codereview.chromium.org/5303002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@67306 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b17b55beca Disable the remaining pylint warnings locally and enable pylint warnings in PRESUBMIT.
This causes some code clutter.

TEST=Increased pylint warning level
BUG=none

Review URL: http://codereview.chromium.org/4321006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64913 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org cb2985fb69 Largely reduce the number of pylint warnings and fix one typo.
Most of them are style issues or variable aliasing.

TEST=Can almost enable pylint warnings
BUG=none

Review URL: http://codereview.chromium.org/4360002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64908 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3a17425279 Reduce the number of pylint warnings in gcl.py to make refactoring simpler.
Doing static analysis on the script greatly easy refactoring since it reduces
the chances of leaving a typo in rarely executed & untested & untested code.

This is in preparation to refactor changelist on-disk format to use json.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/4184008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64427 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6985efce6e Fix small nits.
pylint is useful to catch errors before they go live so fix little annoyances.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3372001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58817 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6e29d572b5 Add pylintrc and fix style for many scripts.
Fix a bug in scm.SVN.DiffItem()

Reduce variable aliasing, fix alignments, etc.

Review URL: http://codereview.chromium.org/2673002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48943 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago