summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2018-06-24 16:21:51 +0900
committerDylan Deng <dxx1104@gmail.com>2018-07-24 22:20:08 +0800
commit65b0ba5aa0447f7ee25103828115662b1eb80ff9 (patch)
treedebc2790e91665968a31319f8fe039f4638911a1
parenta6515fb952ab31a820288ce342e31d2917d0a06c (diff)
downloadgit-repo-65b0ba5aa0447f7ee25103828115662b1eb80ff9.tar.gz
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
-rw-r--r--command.py7
-rw-r--r--git_config.py3
-rwxr-xr-xmain.py4
-rw-r--r--manifest_xml.py3
-rwxr-xr-xproject.py6
-rwxr-xr-xrepo2
-rw-r--r--subcmds/forall.py2
-rw-r--r--subcmds/gitc_delete.py2
-rw-r--r--subcmds/upload.py2
9 files changed, 6 insertions, 25 deletions
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):
218 return result 218 return result
219 219
220 220
221# pylint: disable=W0223
222# Pylint warns that the `InteractiveCommand` and `PagedCommand` classes do not
223# override method `Execute` which is abstract in `Command`. Since that method
224# is always implemented in classes derived from `InteractiveCommand` and
225# `PagedCommand`, this warning can be suppressed.
226class InteractiveCommand(Command): 221class InteractiveCommand(Command):
227 """Command which requires user interaction on the tty and 222 """Command which requires user interaction on the tty and
228 must not run within a pager, even if the user asks to. 223 must not run within a pager, even if the user asks to.
@@ -238,8 +233,6 @@ class PagedCommand(Command):
238 def WantPager(self, _opt): 233 def WantPager(self, _opt):
239 return True 234 return True
240 235
241# pylint: enable=W0223
242
243 236
244class MirrorSafeCommand(object): 237class MirrorSafeCommand(object):
245 """Command permits itself to run within a mirror, 238 """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):
306 d = self._do('--null', '--list') 306 d = self._do('--null', '--list')
307 if d is None: 307 if d is None:
308 return c 308 return c
309 for line in d.decode('utf-8').rstrip('\0').split('\0'): # pylint: disable=W1401 309 for line in d.decode('utf-8').rstrip('\0').split('\0'):
310 # Backslash is not anomalous
311 if '\n' in line: 310 if '\n' in line:
312 key, val = line.split('\n', 1) 311 key, val = line.split('\n', 1)
313 else: 312 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
61from subcmds import all_commands 61from subcmds import all_commands
62 62
63if not is_python3(): 63if not is_python3():
64 # pylint:disable=W0622
65 input = raw_input 64 input = raw_input
66 # pylint:enable=W0622
67 65
68global_options = optparse.OptionParser( 66global_options = optparse.OptionParser(
69 usage="repo [-p|--paginate|--no-pager] COMMAND [ARGS]" 67 usage="repo [-p|--paginate|--no-pager] COMMAND [ARGS]"
@@ -396,7 +394,7 @@ class _KerberosAuthHandler(urllib.request.BaseHandler):
396 self.context = None 394 self.context = None
397 self.handler_order = urllib.request.BaseHandler.handler_order - 50 395 self.handler_order = urllib.request.BaseHandler.handler_order - 50
398 396
399 def http_error_401(self, req, fp, code, msg, headers): # pylint:disable=unused-argument 397 def http_error_401(self, req, fp, code, msg, headers):
400 host = req.get_host() 398 host = req.get_host()
401 retry = self.http_error_auth_reqed('www-authenticate', host, req, headers) 399 retry = self.http_error_auth_reqed('www-authenticate', host, req, headers)
402 return retry 400 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):
483 raise ManifestParseError("no <manifest> in %s" % (path,)) 483 raise ManifestParseError("no <manifest> in %s" % (path,))
484 484
485 nodes = [] 485 nodes = []
486 for node in manifest.childNodes: # pylint:disable=W0631 486 for node in manifest.childNodes:
487 # We only get here if manifest is initialised
488 if node.nodeName == 'include': 487 if node.nodeName == 'include':
489 name = self._reqatt(node, 'name') 488 name = self._reqatt(node, 'name')
490 fp = os.path.join(include_root, name) 489 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:
48 import urlparse 48 import urlparse
49 urllib = imp.new_module('urllib') 49 urllib = imp.new_module('urllib')
50 urllib.parse = urlparse 50 urllib.parse = urlparse
51 # pylint:disable=W0622
52 input = raw_input 51 input = raw_input
53 # pylint:enable=W0622
54 52
55 53
56def _lwrite(path, content): 54def _lwrite(path, content):
@@ -2671,7 +2669,7 @@ class Project(object):
2671 out = p.stdout 2669 out = p.stdout
2672 if out: 2670 if out:
2673 # Backslash is not anomalous 2671 # Backslash is not anomalous
2674 return out[:-1].split('\0') # pylint: disable=W1401 2672 return out[:-1].split('\0')
2675 return [] 2673 return []
2676 2674
2677 def DiffZ(self, name, *args): 2675 def DiffZ(self, name, *args):
@@ -2688,7 +2686,7 @@ class Project(object):
2688 out = p.process.stdout.read() 2686 out = p.process.stdout.read()
2689 r = {} 2687 r = {}
2690 if out: 2688 if out:
2691 out = iter(out[:-1].split('\0')) # pylint: disable=W1401 2689 out = iter(out[:-1].split('\0'))
2692 while out: 2690 while out:
2693 try: 2691 try:
2694 info = next(out) 2692 info = next(out)
diff --git a/repo b/repo
index bd3a3f1c..6d3e8c2f 100755
--- a/repo
+++ b/repo
@@ -507,7 +507,7 @@ def _InitHttp():
507 p = n.hosts[host] 507 p = n.hosts[host]
508 mgr.add_password(p[1], 'http://%s/' % host, p[0], p[2]) 508 mgr.add_password(p[1], 'http://%s/' % host, p[0], p[2])
509 mgr.add_password(p[1], 'https://%s/' % host, p[0], p[2]) 509 mgr.add_password(p[1], 'https://%s/' % host, p[0], p[2])
510 except: # pylint: disable=bare-except 510 except:
511 pass 511 pass
512 handlers.append(urllib.request.HTTPBasicAuthHandler(mgr)) 512 handlers.append(urllib.request.HTTPBasicAuthHandler(mgr))
513 handlers.append(urllib.request.HTTPDigestAuthHandler(mgr)) 513 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.
205 break 205 break
206 else: 206 else:
207 cn = None 207 cn = None
208 # pylint: disable=W0631
209 if cn and cn in _CAN_COLOR: 208 if cn and cn in _CAN_COLOR:
210 class ColorCmd(Coloring): 209 class ColorCmd(Coloring):
211 def __init__(self, config, cmd): 210 def __init__(self, config, cmd):
212 Coloring.__init__(self, config, cmd) 211 Coloring.__init__(self, config, cmd)
213 if ColorCmd(self.manifest.manifestProject.config, cn).is_on: 212 if ColorCmd(self.manifest.manifestProject.config, cn).is_on:
214 cmd.insert(cmd.index(cn) + 1, '--color') 213 cmd.insert(cmd.index(cn) + 1, '--color')
215 # pylint: enable=W0631
216 214
217 mirror = self.manifest.IsMirror 215 mirror = self.manifest.IsMirror
218 rc = 0 216 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
21 21
22from pyversion import is_python3 22from pyversion import is_python3
23if not is_python3(): 23if not is_python3():
24 # pylint:disable=W0622
25 input = raw_input 24 input = raw_input
26 # pylint:enable=W0622
27 25
28class GitcDelete(Command, GitcClientCommand): 26class GitcDelete(Command, GitcClientCommand):
29 common = True 27 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
25from project import RepoHook 25from project import RepoHook
26 26
27from pyversion import is_python3 27from pyversion import is_python3
28# pylint:disable=W0622
29if not is_python3(): 28if not is_python3():
30 input = raw_input 29 input = raw_input
31else: 30else:
32 unicode = str 31 unicode = str
33# pylint:enable=W0622
34 32
35UNUSUAL_COMMIT_THRESHOLD = 5 33UNUSUAL_COMMIT_THRESHOLD = 5
36 34