cgpt: Fix or workaround lint errors

I would like to use the precommit hooks in cgpt.py,
so I fixed the easy lint errors, and defer on the
nontrivial one.

BUG=None
TEST=precommit linter doesn't complain

Change-Id: Ib30ddd3c4ed04975e9d3b166337218094348079c
Reviewed-on: https://chromium-review.googlesource.com/441918
Commit-Ready: Ian Coolidge <icoolidge@google.com>
Tested-by: Ian Coolidge <icoolidge@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/build_library/cgpt.py b/build_library/cgpt.py
index 7cebf2b..8dd5367 100755
--- a/build_library/cgpt.py
+++ b/build_library/cgpt.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python2
 # Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
@@ -10,7 +10,8 @@
 import copy
 import json
 import math
-import optparse
+# TODO(crbug.com/496565): Migrate to Argparse
+import optparse  # pylint: disable=deprecated-module
 import os
 import re
 import sys
@@ -755,7 +756,7 @@
       'local curr=%d' % _GetStartSector(config, partitions),
       '# Create the GPT headers and tables. Pad the primary ones.',
       '${GPT} create -p %d ${target}' % (_GetPrimaryEntryArrayLBA(config) -
-                                           (SIZE_OF_PMBR + SIZE_OF_GPT_HEADER)),
+                                         (SIZE_OF_PMBR + SIZE_OF_GPT_HEADER)),
   ]
 
   metadata = GetMetadataPartition(partitions)