Remove unused pylint suppressions
pylint is not used since bb5b1a0. The pyflakes cleanup mentioned in that
commit has not been done, but given that this project is no longer being
actively developed I don't think it's worth spending time doing it.
Leaving the pylint suppressions causes confusion because it leads people
to think that we are still using pylint.
Change-Id: If7d9f280a0f408c780f15915ffdb80579ae21f69
diff --git a/command.py b/command.py
index 971f968..eb3527f 100644
--- a/command.py
+++ b/command.py
@@ -218,11 +218,6 @@
return result
-# pylint: disable=W0223
-# Pylint warns that the `InteractiveCommand` and `PagedCommand` classes do not
-# override method `Execute` which is abstract in `Command`. Since that method
-# is always implemented in classes derived from `InteractiveCommand` and
-# `PagedCommand`, this warning can be suppressed.
class InteractiveCommand(Command):
"""Command which requires user interaction on the tty and
must not run within a pager, even if the user asks to.
@@ -238,8 +233,6 @@
def WantPager(self, _opt):
return True
-# pylint: enable=W0223
-
class MirrorSafeCommand(object):
"""Command permits itself to run within a mirror,
diff --git a/git_config.py b/git_config.py
index 854b238..7bc6f77 100644
--- a/git_config.py
+++ b/git_config.py
@@ -306,8 +306,7 @@
d = self._do('--null', '--list')
if d is None:
return c
- for line in d.decode('utf-8').rstrip('\0').split('\0'): # pylint: disable=W1401
- # Backslash is not anomalous
+ for line in d.decode('utf-8').rstrip('\0').split('\0'):
if '\n' in line:
key, val = line.split('\n', 1)
else:
diff --git a/main.py b/main.py
index a6538c2..be5e313 100755
--- a/main.py
+++ b/main.py
@@ -61,9 +61,7 @@
from subcmds import all_commands
if not is_python3():
- # pylint:disable=W0622
input = raw_input
- # pylint:enable=W0622
global_options = optparse.OptionParser(
usage="repo [-p|--paginate|--no-pager] COMMAND [ARGS]"
@@ -396,7 +394,7 @@
self.context = None
self.handler_order = urllib.request.BaseHandler.handler_order - 50
- def http_error_401(self, req, fp, code, msg, headers): # pylint:disable=unused-argument
+ def http_error_401(self, req, fp, code, msg, headers):
host = req.get_host()
retry = self.http_error_auth_reqed('www-authenticate', host, req, headers)
return retry
diff --git a/manifest_xml.py b/manifest_xml.py
index d0211ea..81a6a85 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -483,8 +483,7 @@
raise ManifestParseError("no <manifest> in %s" % (path,))
nodes = []
- for node in manifest.childNodes: # pylint:disable=W0631
- # We only get here if manifest is initialised
+ for node in manifest.childNodes:
if node.nodeName == 'include':
name = self._reqatt(node, 'name')
fp = os.path.join(include_root, name)
diff --git a/project.py b/project.py
index 855bd60..d551351 100755
--- a/project.py
+++ b/project.py
@@ -48,9 +48,7 @@
import urlparse
urllib = imp.new_module('urllib')
urllib.parse = urlparse
- # pylint:disable=W0622
input = raw_input
- # pylint:enable=W0622
def _lwrite(path, content):
@@ -2671,7 +2669,7 @@
out = p.stdout
if out:
# Backslash is not anomalous
- return out[:-1].split('\0') # pylint: disable=W1401
+ return out[:-1].split('\0')
return []
def DiffZ(self, name, *args):
@@ -2688,7 +2686,7 @@
out = p.process.stdout.read()
r = {}
if out:
- out = iter(out[:-1].split('\0')) # pylint: disable=W1401
+ out = iter(out[:-1].split('\0'))
while out:
try:
info = next(out)
diff --git a/repo b/repo
index bd3a3f1..6d3e8c2 100755
--- a/repo
+++ b/repo
@@ -507,7 +507,7 @@
p = n.hosts[host]
mgr.add_password(p[1], 'http://%s/' % host, p[0], p[2])
mgr.add_password(p[1], 'https://%s/' % host, p[0], p[2])
- except: # pylint: disable=bare-except
+ except:
pass
handlers.append(urllib.request.HTTPBasicAuthHandler(mgr))
handlers.append(urllib.request.HTTPDigestAuthHandler(mgr))
diff --git a/subcmds/forall.py b/subcmds/forall.py
index 52eb5e2..693949e 100644
--- a/subcmds/forall.py
+++ b/subcmds/forall.py
@@ -205,14 +205,12 @@
break
else:
cn = None
- # pylint: disable=W0631
if cn and cn in _CAN_COLOR:
class ColorCmd(Coloring):
def __init__(self, config, cmd):
Coloring.__init__(self, config, cmd)
if ColorCmd(self.manifest.manifestProject.config, cn).is_on:
cmd.insert(cmd.index(cn) + 1, '--color')
- # pylint: enable=W0631
mirror = self.manifest.IsMirror
rc = 0
diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py
index 54f62f4..4d8cd8c 100644
--- a/subcmds/gitc_delete.py
+++ b/subcmds/gitc_delete.py
@@ -21,9 +21,7 @@
from pyversion import is_python3
if not is_python3():
- # pylint:disable=W0622
input = raw_input
- # pylint:enable=W0622
class GitcDelete(Command, GitcClientCommand):
common = True
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 77eaf81..fdc7e28 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -25,12 +25,10 @@
from project import RepoHook
from pyversion import is_python3
-# pylint:disable=W0622
if not is_python3():
input = raw_input
else:
unicode = str
-# pylint:enable=W0622
UNUSUAL_COMMIT_THRESHOLD = 5