Fix cros lint issues in chromite/scripts.

Fix or disable all cros lint warnings in scripts.

BUG=None
TEST=Ran pylint.

Change-Id: Iedd2f2e361ea82c082f1c95c9054ac15d19193ff
Reviewed-on: https://chromium-review.googlesource.com/190730
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/parallel_emerge.py b/scripts/parallel_emerge.py
index 4e59572..40b5db8 100644
--- a/scripts/parallel_emerge.py
+++ b/scripts/parallel_emerge.py
@@ -58,7 +58,7 @@
 # /usr/lib/portage/pym/.
 #
 # TODO(davidjames): Update Portage to expose public APIs for these features.
-# pylint: disable=W0212
+# pylint: disable=F0401
 from _emerge.actions import adjust_configs
 from _emerge.actions import load_emerge_config
 from _emerge.create_depgraph_params import create_depgraph_params
@@ -449,6 +449,7 @@
 
     # Build our own tree from the emerge digraph.
     deps_tree = {}
+    # pylint: disable=W0212
     digraph = depgraph._dynamic_config.digraph
     root = emerge.settings["ROOT"]
     final_db = depgraph._dynamic_config.mydbapi[root]
@@ -810,6 +811,8 @@
 
 
 class EmergeJobState(object):
+  """Structure describing the EmergeJobState."""
+
   __slots__ = ["done", "filename", "last_notify_timestamp", "last_output_seek",
                "last_output_timestamp", "pkgname", "retcode", "start_timestamp",
                "target", "fetch_only", "unpack_only"]
@@ -908,8 +911,10 @@
                   sys.stdin.fileno(): sys.stdin.fileno(),
                   output.fileno(): output.fileno()}
       if 0 <= vercmp(portage.VERSION, "2.1.11.50"):
+        # pylint: disable=W0212
         portage.process._setup_pipes(fd_pipes, close_fds=False)
       else:
+        # pylint: disable=W0212
         portage.process._setup_pipes(fd_pipes)
 
       # Portage doesn't like when sys.stdin.fileno() != 0, so point sys.stdin
@@ -936,6 +941,7 @@
     sys.stdout.flush()
     sys.stderr.flush()
     output.flush()
+    # pylint: disable=W0212
     os._exit(retval)
   else:
     # Return the exit code of the subprocess.
@@ -1003,6 +1009,7 @@
   bindb = emerge.trees[root]["bintree"].dbapi
   # Might be a set, might be a list, might be None; no clue, just use shallow
   # copy to ensure we can roll it back.
+  # pylint: disable=W0212
   original_remotepkgs = copy.copy(bindb.bintree._remotepkgs)
 
   opts, spinner = emerge.opts, emerge.spinner
@@ -1175,6 +1182,7 @@
 
 
 class TargetState(object):
+  """Structure descriting the TargetState."""
 
   __slots__ = ("target", "info", "score", "prefetched", "fetched_successfully")
 
@@ -1200,6 +1208,7 @@
 
 
 class ScoredHeap(object):
+  """Implementation of a general purpose scored heap."""
 
   __slots__ = ("heap", "_heap_set")
 
@@ -1760,6 +1769,7 @@
   # packages.
   portage_upgrade = False
   root = emerge.settings["ROOT"]
+  # pylint: disable=W0212
   final_db = emerge.depgraph._dynamic_config.mydbapi[root]
   if root == "/":
     for db_pkg in final_db.match_pkgs("sys-apps/portage"):
@@ -1795,6 +1805,7 @@
   try:
     scheduler.Run()
   finally:
+    # pylint: disable=W0212
     scheduler._Shutdown()
   scheduler = None