add pep8 tests and fix redundant backslashes between brackets

This commit is contained in:
Paul Morgan 2014-02-15 21:33:45 +00:00
parent 4fe4ed4de7
commit 7846ee875d
6 changed files with 7 additions and 6 deletions

View file

@ -399,7 +399,7 @@ class Builder(ConfigObject, BuilderBase):
"""
self._setup_sources()
run_command("cp %s/%s %s/" % \
run_command("cp %s/%s %s/" %
(self.rpmbuild_sourcedir, self.tgz_filename,
self.rpmbuild_basedir))

View file

@ -329,7 +329,7 @@ class BuildModule(BaseCliModule):
help="Build rpm")
self.parser.add_option("-i", "--install", dest="auto_install",
action="store_true", default=False,
help="Install any binary rpms being built. (WARNING: " + \
help="Install any binary rpms being built. (WARNING: " +
"uses sudo rpm -Uvh --force)")
self.parser.add_option("--dist", dest="dist", metavar="DISTTAG",
help="Dist tag to apply to srpm and/or rpm. (i.e. .el5)")

View file

@ -196,7 +196,7 @@ def find_git_root():
"""
(status, cdup) = commands.getstatusoutput("git rev-parse --show-cdup")
if status > 0:
error_out(["%s does not appear to be within a git checkout." % \
error_out(["%s does not appear to be within a git checkout." %
os.getcwd()])
if cdup.strip() == "":

View file

@ -26,9 +26,9 @@ class DistributionBuilder(UpstreamBuilder):
ch_dir = os.path.join(self.git_root,
self.relative_project_dir)
os.chdir(ch_dir)
debug("Running /usr/bin/generate-patches.pl -d %s %s %s-1 %s %s" \
debug("Running /usr/bin/generate-patches.pl -d %s %s %s-1 %s %s"
% (self.rpmbuild_gitcopy, self.project_name, self.upstream_version, self.build_version, self.git_commit_id))
output = run_command("/usr/bin/generate-patches.pl -d %s %s %s-1 %s %s" \
output = run_command("/usr/bin/generate-patches.pl -d %s %s %s-1 %s %s"
% (self.rpmbuild_gitcopy, self.project_name, self.upstream_version, self.build_version, self.git_commit_id))
self.patch_files = output.split("\n")
for p_file in self.patch_files:

View file

@ -227,7 +227,7 @@ class VersionTagger(ConfigObject):
fd, name = tempfile.mkstemp()
os.write(fd, "# Create your changelog entry below:\n")
if self.git_email is None or (('HIDE_EMAIL' in self.user_config) and \
if self.git_email is None or (('HIDE_EMAIL' in self.user_config) and
(self.user_config['HIDE_EMAIL'] not in ['0', ''])):
header = "* %s %s\n" % (self.today, self.git_user)
else:

View file

@ -35,6 +35,7 @@ class TestPep8(TitoUnitTestFixture):
'E2', # whitespace errors
'E3', # blank line errors
'E4', # import errors
'E502', # the backslash is redundant between brackets
'E7', # statement errors
'E9', # runtime errors (SyntaxError, IndentationError, IOError)
'W2', # whitespace warnings