summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pylint/checkers/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pylint/checkers/__init__.py b/pylint/checkers/__init__.py
index a8b6bac78..9c6306f3a 100644
--- a/pylint/checkers/__init__.py
+++ b/pylint/checkers/__init__.py
@@ -51,10 +51,8 @@ def table_lines_from_stats(stats, _, columns):
lines = []
for m_type in columns:
new = stats[m_type]
- format = str # pylint: disable=redefined-builtin
- if isinstance(new, float):
- format = lambda num: "%.3f" % num
- lines += (m_type.replace("_", " "), format(new), "NC", "NC")
+ new = "%.3f" % new if isinstance(new, float) else str(new)
+ lines += (m_type.replace("_", " "), new, "NC", "NC")
return lines