diff options
Diffstat (limited to 'pylint/checkers/raw_metrics.py')
-rw-r--r-- | pylint/checkers/raw_metrics.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/checkers/raw_metrics.py b/pylint/checkers/raw_metrics.py index 22bd096cb..eb3f717ff 100644 --- a/pylint/checkers/raw_metrics.py +++ b/pylint/checkers/raw_metrics.py @@ -29,7 +29,7 @@ def report_raw_stats(sect, stats, old_stats): total_lines = stats["total_lines"] if not total_lines: raise EmptyReportError() - sect.description = "%s lines have been analyzed" % total_lines + sect.description = f"{total_lines} lines have been analyzed" lines = ("type", "number", "%", "previous", "difference") for node_type in ("code", "docstring", "comment", "empty"): key = node_type + "_lines" @@ -40,7 +40,7 @@ def report_raw_stats(sect, stats, old_stats): diff_str = diff_string(old, total) else: old, diff_str = "NC", "NC" - lines += (node_type, str(total), "%.2f" % percent, str(old), diff_str) + lines += (node_type, str(total), f"{percent:.2f}", str(old), diff_str) sect.append(Table(children=lines, cols=5, rheaders=1)) |