diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2019-03-28 21:36:47 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-03-29 09:37:05 +0100 |
commit | 293a7f5e6add850e2f127dd1680a6e43fb1a6949 (patch) | |
tree | 0b9380a7155885f52b69e83c1b8bf0c4314e4796 /pylint/utils | |
parent | 0e81b797f8d852da50ec88a73fc9aa320c10a7ac (diff) | |
download | pylint-git-293a7f5e6add850e2f127dd1680a6e43fb1a6949.tar.gz |
Refactor - Remove unused and untested code in utils
There might be code that is used only in test but it's harder
to detect.
Diffstat (limited to 'pylint/utils')
-rw-r--r-- | pylint/utils/__init__.py | 1 | ||||
-rw-r--r-- | pylint/utils/utils.py | 18 |
2 files changed, 0 insertions, 19 deletions
diff --git a/pylint/utils/__init__.py b/pylint/utils/__init__.py index 310b83079..67b56db3a 100644 --- a/pylint/utils/__init__.py +++ b/pylint/utils/__init__.py @@ -52,7 +52,6 @@ from pylint.utils.utils import ( category_id, decoding_stream, deprecated_option, - diff_string, expand_modules, format_section, get_global_option, diff --git a/pylint/utils/utils.py b/pylint/utils/utils.py index 08f6852b5..e78cd98a4 100644 --- a/pylint/utils/utils.py +++ b/pylint/utils/utils.py @@ -27,24 +27,6 @@ def normalize_text(text, line_len=80, indent=""): ) -CMPS = ["=", "-", "+"] - -# py3k has no more cmp builtin -if sys.version_info >= (3, 0): - - def cmp(a, b): # pylint: disable=redefined-builtin - return (a > b) - (a < b) - - -def diff_string(old, new): - """given an old and new int value, return a string representing the - difference - """ - diff = abs(old - new) - diff_str = "%s%s" % (CMPS[cmp(old, new)], diff and ("%.2f" % diff) or "") - return diff_str - - def get_module_and_frameid(node): """return the module name and the frame id in the module""" frame = node.frame() |