diff --git a/command.py b/command.py index 971f968b..eb3527f0 100644 --- a/command.py +++ b/command.py @@ -218,11 +218,6 @@ class Command(object): 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 @@ class PagedCommand(Command): 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 854b2387..7bc6f77d 100644 --- a/git_config.py +++ b/git_config.py @@ -306,8 +306,7 @@ class GitConfig(object): 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 a6538c2a..be5e3131 100755 --- a/main.py +++ b/main.py @@ -61,9 +61,7 @@ from wrapper import WrapperPath, Wrapper 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 @@ class _KerberosAuthHandler(urllib.request.BaseHandler): 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 d0211eaf..81a6a858 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -483,8 +483,7 @@ class XmlManifest(object): raise ManifestParseError("no 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 855bd60d..d551351b 100755 --- a/project.py +++ b/project.py @@ -48,9 +48,7 @@ else: 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 @@ class Project(object): 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 @@ class Project(object): 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 bd3a3f1c..6d3e8c2f 100755 --- a/repo +++ b/repo @@ -507,7 +507,7 @@ def _InitHttp(): 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 52eb5e28..693949e2 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -205,14 +205,12 @@ without iterating through the remaining projects. 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 54f62f46..4d8cd8c2 100644 --- a/subcmds/gitc_delete.py +++ b/subcmds/gitc_delete.py @@ -21,9 +21,7 @@ import platform_utils 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 77eaf81a..fdc7e28d 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -25,12 +25,10 @@ from git_command import GitCommand 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