Update pylintrc to catch more style violations.
The current PyLint configuration doesn't catch violations
to the Chromium Python Style Guide in a good way.
This change adds mostly the correct style regex for functions
and methods, with most content copied from
https://cs.chromium.org/chromium/tools/depot_tools/pylintrc
and (since the former disables invalid-name)
https://cs.chromium.org/chromium/src/third_party/chromite/pylintrc
Many settings are the defaults, but are now more explicit to make it
easier to find them for our users.
Also convert the previous one-line list of disabled lint check into
a one-per-line list instead.
Add import-error to the list of disabled lint checks.
This CL depends on https://codereview.webrtc.org/2812273002/
to be landed first in order to not produce a lot of errors.
BUG=webrtc:7303
NOTRY=True
TESTED=git cl presubmit passing when tested in
combination with https://codereview.webrtc.org/2812273002/
TBR=niklas.enbom@webrtc.org
Review-Url: https://codereview.webrtc.org/2737963003
Cr-Commit-Position: refs/heads/master@{#17685}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index efa80fa..24eff14 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -526,6 +526,7 @@
black_list=(r'^base[\\\/].*\.py$',
r'^build[\\\/].*\.py$',
r'^buildtools[\\\/].*\.py$',
+ r'^infra[\\\/].*\.py$',
r'^ios[\\\/].*\.py$',
r'^out.*[\\\/].*\.py$',
r'^testing[\\\/].*\.py$',
@@ -535,10 +536,6 @@
r'^tools-webrtc[\\\/]mb[\\\/].*\.py$',
r'^tools-webrtc[\\\/]valgrind[\\\/].*\.py$',
r'^xcodebuild.*[\\\/].*\.py$',),
- disabled_warnings=['F0401', # Failed to import x
- 'E0611', # No package y in x
- 'W0232', # Class has no __init__ method
- ],
pylintrc='pylintrc'))
# TODO(nisse): talk/ is no more, so make below checks simpler?