Skip to content

Commit d35983d

Browse files
committed
Resolve PEP8 issue W291
* W291 trailing whitespace
1 parent 902adde commit d35983d

File tree

8 files changed

+73
-73
lines changed

8 files changed

+73
-73
lines changed

osc/build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
'armv7hl':[ 'armv7hl' ], # not existing arch, just for compatibility
6464
'armv8el':[ 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el' ], # not existing arch, just for compatibility
6565
'armv8l' :[ 'armv4l', 'armv5el', 'armv6el', 'armv7el', 'armv8el' ], # not existing arch, just for compatibility
66-
'armv5tel':[ 'armv4l', 'armv5el', 'armv5tel' ],
66+
'armv5tel':[ 'armv4l', 'armv5el', 'armv5tel' ],
6767
's390x': ['s390' ],
6868
'ppc64': [ 'ppc', 'ppc64', 'ppc64p7', 'ppc64le' ],
6969
'ppc64le':[ 'ppc64le' ],
@@ -640,8 +640,8 @@ def main(apiurl, opts, argv):
640640
pkg_meta_e = None
641641
try:
642642
# take care, not to run into double trouble.
643-
pkg_meta_e = meta_exists(metatype='pkg', path_args=(quote_plus(prj),
644-
quote_plus(pac)), template_args=None, create_new=False,
643+
pkg_meta_e = meta_exists(metatype='pkg', path_args=(quote_plus(prj),
644+
quote_plus(pac)), template_args=None, create_new=False,
645645
apiurl=apiurl)
646646
except:
647647
pass

osc/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def readkey(self, file):
9090

9191
def check(self, pkg):
9292
# avoid errors on non rpm
93-
if pkg[-4:] != '.rpm':
93+
if pkg[-4:] != '.rpm':
9494
return
9595
fd = None
9696
try:

osc/cmdln.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def parseline(self, line):
516516
elif line[0] == '?':
517517
line = 'help ' + line[1:]
518518
i, n = 0, len(line)
519-
while i < n and line[i] in self.identchars:
519+
while i < n and line[i] in self.identchars:
520520
i = i+1
521521
cmd, arg = line[:i], line[i:].strip()
522522
return cmd, arg, line
@@ -574,7 +574,7 @@ def do_help(self, argv):
574574
doc = self.__class__.__doc__ # try class docstring
575575
if doc is None:
576576
# Try to provide some reasonable useful default help.
577-
if self.cmdlooping:
577+
if self.cmdlooping:
578578
prefix = ""
579579
else:
580580
prefix = self.name+' '
@@ -739,7 +739,7 @@ def _help_get_command_list(self):
739739
token2canonical = self._get_canonical_map()
740740
aliases = {}
741741
for token, cmdname in token2canonical.items():
742-
if token == cmdname:
742+
if token == cmdname:
743743
continue
744744
aliases.setdefault(cmdname, []).append(token)
745745

@@ -803,7 +803,7 @@ def _help_preprocess_help_list(self, help, cmdname=None):
803803
helpnames = {}
804804
token2cmdname = self._get_canonical_map()
805805
for attr in self.get_names():
806-
if not attr.startswith("help_"):
806+
if not attr.startswith("help_"):
807807
continue
808808
helpname = attr[5:]
809809
if helpname not in token2cmdname:
@@ -854,9 +854,9 @@ def _help_preprocess_cmd_usage(self, help, cmdname=None):
854854

855855
# Adjust argcount for possible *args and **kwargs arguments.
856856
argcount = co_argcount
857-
if co_flags & CO_FLAGS_ARGS:
857+
if co_flags & CO_FLAGS_ARGS:
858858
argcount += 1
859-
if co_flags & CO_FLAGS_KWARGS:
859+
if co_flags & CO_FLAGS_KWARGS:
860860
argcount += 1
861861

862862
# Determine the usage string.
@@ -937,9 +937,9 @@ def _get_canonical_map(self):
937937
token2canonical = {}
938938
cmd2funcname = {} # use a dict to strip duplicates
939939
for attr in self.get_names():
940-
if attr.startswith("do_"):
940+
if attr.startswith("do_"):
941941
cmdname = attr[3:]
942-
elif attr.startswith("_do_"):
942+
elif attr.startswith("_do_"):
943943
cmdname = attr[4:]
944944
else:
945945
continue
@@ -1371,12 +1371,12 @@ def line2argv(line):
13711371
i = -1
13721372
while True:
13731373
i += 1
1374-
if i >= len(line):
1374+
if i >= len(line):
13751375
break
13761376
ch = line[i]
13771377

13781378
if ch == "\\": # escaped char always added to arg, regardless of state
1379-
if arg is None:
1379+
if arg is None:
13801380
arg = ""
13811381
i += 1
13821382
arg += line[i]
@@ -1394,19 +1394,19 @@ def line2argv(line):
13941394
arg += ch
13951395
elif state == "default":
13961396
if ch == '"':
1397-
if arg is None:
1397+
if arg is None:
13981398
arg = ""
13991399
state = "double-quoted"
14001400
elif ch == "'":
1401-
if arg is None:
1401+
if arg is None:
14021402
arg = ""
14031403
state = "single-quoted"
14041404
elif ch in string.whitespace:
14051405
if arg is not None:
14061406
argv.append(arg)
14071407
arg = None
14081408
else:
1409-
if arg is None:
1409+
if arg is None:
14101410
arg = ""
14111411
arg += ch
14121412
if arg is not None:
@@ -1485,7 +1485,7 @@ def _dedentlines(lines, tabsize=8, skip_first_line=False):
14851485
break
14861486
else:
14871487
continue # skip all-whitespace lines
1488-
if DEBUG:
1488+
if DEBUG:
14891489
print("dedent: indent=%d: %r" % (indent, line))
14901490
if margin is None:
14911491
margin = indent
@@ -1496,7 +1496,7 @@ def _dedentlines(lines, tabsize=8, skip_first_line=False):
14961496

14971497
if margin is not None and margin > 0:
14981498
for i, line in enumerate(lines):
1499-
if i == 0 and skip_first_line:
1499+
if i == 0 and skip_first_line:
15001500
continue
15011501
removed = 0
15021502
for j, ch in enumerate(line):
@@ -1505,7 +1505,7 @@ def _dedentlines(lines, tabsize=8, skip_first_line=False):
15051505
elif ch == '\t':
15061506
removed += tabsize - (removed % tabsize)
15071507
elif ch in '\r\n':
1508-
if DEBUG:
1508+
if DEBUG:
15091509
print("dedent: %r: EOL -> strip up to EOL" % line)
15101510
lines[i] = lines[i][j:]
15111511
break

0 commit comments

Comments
 (0)