diff options
-rw-r--r-- | command.py | 7 | ||||
-rw-r--r-- | git_config.py | 3 | ||||
-rwxr-xr-x | main.py | 4 | ||||
-rw-r--r-- | manifest_xml.py | 3 | ||||
-rwxr-xr-x | project.py | 6 | ||||
-rwxr-xr-x | repo | 2 | ||||
-rw-r--r-- | subcmds/forall.py | 2 | ||||
-rw-r--r-- | subcmds/gitc_delete.py | 2 | ||||
-rw-r--r-- | subcmds/upload.py | 2 |
9 files changed, 6 insertions, 25 deletions
@@ -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. | ||
226 | class InteractiveCommand(Command): | 221 | class 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 | ||
244 | class MirrorSafeCommand(object): | 237 | class 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: |
@@ -61,9 +61,7 @@ from wrapper import WrapperPath, Wrapper | |||
61 | from subcmds import all_commands | 61 | from subcmds import all_commands |
62 | 62 | ||
63 | if not is_python3(): | 63 | if not is_python3(): |
64 | # pylint:disable=W0622 | ||
65 | input = raw_input | 64 | input = raw_input |
66 | # pylint:enable=W0622 | ||
67 | 65 | ||
68 | global_options = optparse.OptionParser( | 66 | global_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) |
@@ -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 | ||
56 | def _lwrite(path, content): | 54 | def _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) |
@@ -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 | ||
22 | from pyversion import is_python3 | 22 | from pyversion import is_python3 |
23 | if not is_python3(): | 23 | if not is_python3(): |
24 | # pylint:disable=W0622 | ||
25 | input = raw_input | 24 | input = raw_input |
26 | # pylint:enable=W0622 | ||
27 | 25 | ||
28 | class GitcDelete(Command, GitcClientCommand): | 26 | class 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 | |||
25 | from project import RepoHook | 25 | from project import RepoHook |
26 | 26 | ||
27 | from pyversion import is_python3 | 27 | from pyversion import is_python3 |
28 | # pylint:disable=W0622 | ||
29 | if not is_python3(): | 28 | if not is_python3(): |
30 | input = raw_input | 29 | input = raw_input |
31 | else: | 30 | else: |
32 | unicode = str | 31 | unicode = str |
33 | # pylint:enable=W0622 | ||
34 | 32 | ||
35 | UNUSUAL_COMMIT_THRESHOLD = 5 | 33 | UNUSUAL_COMMIT_THRESHOLD = 5 |
36 | 34 | ||