contrib: pylintrc: pull in chromite updates

Turn on a lot of Python 3 & other style improvements we've added to
chromite in recent times.

BUG=chromium:980619
TEST=`cros lint` on files in here isn't too bad, but does catch new things

Change-Id: Ie76a61eb6a55c3721ac544ff361e7c0ecc457c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/1742539
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/contrib/pylintrc b/contrib/pylintrc
index 4cbb96e..114b229 100644
--- a/contrib/pylintrc
+++ b/contrib/pylintrc
@@ -6,8 +6,70 @@
 
 load-plugins=chromite.cli.cros.lint
 
+# Configure quote preferences.
+string-quote = single-avoid-escape
+triple-quote = double
+docstring-quote = double
+
 [MESSAGES CONTROL]
 
+enable=
+    apply-builtin,
+    backtick,
+    bad-python3-import,
+    buffer-builtin,
+    cmp-builtin,
+    cmp-method,
+    coerce-builtin,
+    coerce-method,
+    delslice-method,
+    deprecated-itertools-function,
+    deprecated-str-translate-call,
+    deprecated-string-function,
+    deprecated-types-field,
+    dict-items-not-iterating,
+    dict-iter-method,
+    dict-keys-not-iterating,
+    dict-values-not-iterating,
+    dict-view-method,
+    div-method,
+    exception-message-attribute,
+    execfile-builtin,
+    file-builtin,
+    filter-builtin-not-iterating,
+    getslice-method,
+    hex-method,
+    idiv-method,
+    import-star-module-level,
+    indexing-exception,
+    input-builtin,
+    intern-builtin,
+    invalid-str-codec,
+    long-builtin,
+    map-builtin-not-iterating,
+    metaclass-assignment,
+    next-method-called,
+    next-method-defined,
+    nonzero-method,
+    oct-method,
+    old-raise-syntax,
+    parameter-unpacking,
+    print-statement,
+    raising-string,
+    range-builtin-not-iterating,
+    raw_input-builtin,
+    rdiv-method,
+    reduce-builtin,
+    reload-builtin,
+    setslice-method,
+    standarderror-builtin,
+    sys-max-int,
+    unichr-builtin,
+    unpacking-in-except,
+    using-cmp-argument,
+    xrange-builtin,
+    zip-builtin-not-iterating,
+
 disable=
     too-many-lines,
     too-many-branches,
@@ -41,6 +103,19 @@
 
 [BASIC]
 
+# List of builtins function names that should not be used, separated by a comma.
+# exit & quit are for the interactive interpreter shell only.
+# https://docs.python.org/3/library/constants.html#constants-added-by-the-site-module
+bad-functions=
+    apply,
+    exit,
+    filter,
+    input,
+    map,
+    quit,
+    raw_input,
+    reduce,
+
 # Regular expression which should only match correct function names
 #
 # CHANGE: The ChromiumOS standard is different than PEP-8, so we need to
@@ -71,5 +146,24 @@
 
 [IMPORTS]
 
-# Deprecated modules which should not be used, separated by a comma
-deprecated-modules=regsub,TERMIOS,Bastion,rexec,optparse
+# Deprecated modules which should not be used, separated by a comma.
+# Bastion: Dropped in Python 3.
+# mox: Use the 'mock' module instead.
+# optparse: Use the 'argparse' module instead.
+# regsub: Use the 're' module instead.
+# rexec: Dropped in Python 3.
+# TERMIOS: Use the 'termios' module instead.
+deprecated-modules=
+    Bastion,
+    mox,
+    optparse,
+    regsub,
+    rexec,
+    TERMIOS,
+
+
+[LOGGING]
+
+# Apply logging string format checks to calls on these modules.
+logging-modules=
+    logging,