mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-02-24 02:06:12 +00:00
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
This commit is contained in:
parent
a6515fb952
commit
65b0ba5aa0
@ -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,
|
||||
|
@ -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:
|
||||
|
4
main.py
4
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
|
||||
|
@ -483,8 +483,7 @@ class XmlManifest(object):
|
||||
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)
|
||||
|
@ -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)
|
||||
|
2
repo
2
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))
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user