From c64d491601c19ad701364526dc9e84e13d7d8d85 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 3 Mar 2015 11:00:05 +0100 Subject: [PATCH] ceph_argparse.py: fix pep8 indentation errors Fix for: - E126 continuation line over-indented for hanging indent - E128 continuation line under-indented for visual indent - E129 visually indented line with same indent as next logical line - E131 continuation line unaligned for hanging indent Signed-off-by: Danny Al-Gaaf --- src/pybind/ceph_argparse.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index c9e9d16acb941..3c5083eb929e1 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -198,7 +198,7 @@ class CephString(CephArgtype): re.compile(goodchars) except: raise ValueError('CephString(): "{0}" is not a valid RE'. - format(goodchars)) + format(goodchars)) self.goodchars = goodchars self.goodset = frozenset( [c for c in printable if re.match(goodchars, c)] @@ -208,7 +208,7 @@ class CephString(CephArgtype): sset = set(s) if self.goodset and not sset <= self.goodset: raise ArgumentFormat("invalid chars {0} in {1}". - format(''.join(sset - self.goodset), s)) + format(''.join(sset - self.goodset), s)) self.val = s def __str__(self): @@ -583,7 +583,7 @@ class argdesc(object): def __str__(self): if ((self.t == CephChoices and len(self.instance.strings) == 1) - or (self.t == CephPrefix)): + or (self.t == CephPrefix)): s = str(self.instance) else: s = '{0}({1})'.format(self.name, str(self.instance)) @@ -869,7 +869,7 @@ def validate(args, signature, partial=False): return d raise ArgumentNumber( 'saw {0} of {1}, expected at least 1'. - format(desc.numseen, desc) + format(desc.numseen, desc) ) elif not desc.N and desc.numseen < desc.n: # wanted n, got too few @@ -948,15 +948,17 @@ def validate_command(sigdict, args, verbose=False): if (matched > best_match_cnt): if verbose: print >> sys.stderr, \ - "better match: {0} > {1}: {2}:{3} ".format(matched, - best_match_cnt, cmdtag, concise_sig(sig)) + "better match: {0} > {1}: {2}:{3} ".\ + format(matched, best_match_cnt, cmdtag, + concise_sig(sig)) best_match_cnt = matched bestcmds = [{cmdtag: cmd}] elif matched == best_match_cnt: if verbose: print >> sys.stderr, \ - "equal match: {0} > {1}: {2}:{3} ".format(matched, - best_match_cnt, cmdtag, concise_sig(sig)) + "equal match: {0} > {1}: {2}:{3} ".\ + format(matched, best_match_cnt, cmdtag, + concise_sig(sig)) bestcmds.append({cmdtag: cmd}) # Sort bestcmds by number of args so we can try shortest first @@ -987,7 +989,7 @@ def validate_command(sigdict, args, verbose=False): # the next one matches completely. Whine, but pass. if verbose: print >> sys.stderr, 'Not enough args supplied for ', \ - concise_sig(sig) + concise_sig(sig) except ArgumentError as e: # Solid mismatch on an arg (type, range, etc.) # Stop now, because we have the right command but -- 2.39.5