summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2019-03-28 21:57:41 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2019-03-29 09:37:05 +0100
commita14fe17c097d5925f15c9164832aa339f9ad5d1e (patch)
tree06aa1e2c7fe118af47f734371317a3fad8feb1fe
parent293a7f5e6add850e2f127dd1680a6e43fb1a6949 (diff)
downloadpylint-git-a14fe17c097d5925f15c9164832aa339f9ad5d1e.tar.gz
Fix - Remove the redefined build-in instead of using a pragma
-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