Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

Commit

Permalink
Upgrade Python syntax with pyupgrade (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored and Michael Howitz committed Apr 18, 2019
1 parent cefee3d commit 6516078
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/z3c/coverage/coveragediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def warn(filename, message):
"""
module = strip(os.path.basename(filename), '.cover')
print('%s: %s' % (module, message))
print('{}: {}'.format(module, message))


def compare_dirs(olddir, newdir, include=(), exclude=(), warn=warn):
Expand Down Expand Up @@ -240,7 +240,7 @@ def __init__(self, web_url=None):
def warn(self, filename, message):
"""Warn about test coverage regression."""
module = strip(os.path.basename(filename), '.cover')
print('%s: %s' % (module, message))
print('{}: {}'.format(module, message))
if self.web_url:
url = urljoin(self.web_url, module + '.html')
print('See ' + url)
Expand All @@ -264,7 +264,7 @@ def __init__(self, from_addr, to_addr, subject, web_url=None,
def warn(self, filename, message):
"""Warn about test coverage regression."""
module = strip(os.path.basename(filename), '.cover')
self.warnings.append('%s: %s' % (module, message))
self.warnings.append('{}: {}'.format(module, message))
if self.web_url:
url = urljoin(self.web_url, module + '.html')
self.warnings.append('See ' + url + '\n')
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/coverage/coveragereport.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def make_coverage_reports(path, report_path, opts):
print(tree)
rev = get_svn_revision(os.path.join(path, os.path.pardir))
timestamp = str(datetime.datetime.utcnow()) + "Z"
footer = "Generated for revision %s on %s" % (rev, timestamp)
footer = "Generated for revision {} on {}".format(rev, timestamp)
create_report_path(report_path)
generate_htmls_from_tree(tree, path, report_path, footer)
generate_overall_html_from_tree(
Expand Down

0 comments on commit 6516078

Please sign in to comment.