diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2019-03-28 21:57:41 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-03-29 09:37:05 +0100 |
commit | a14fe17c097d5925f15c9164832aa339f9ad5d1e (patch) | |
tree | 06aa1e2c7fe118af47f734371317a3fad8feb1fe | |
parent | 293a7f5e6add850e2f127dd1680a6e43fb1a6949 (diff) | |
download | pylint-git-a14fe17c097d5925f15c9164832aa339f9ad5d1e.tar.gz |
Fix - Remove the redefined build-in instead of using a pragma
-rw-r--r-- | pylint/checkers/__init__.py | 6 |
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 |