diff --git a/Makefile b/Makefile index 19002bcc..9204286c 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ tox: pylint: @echo -e "$(white)=$(blue) Starting sanity pylint test$(reset)" - $(PYTHON) -m pylint lib/ test/ + $(PYTHON) -m pylint -e useless-suppression lib/ test/ language: @echo -e "$(white)=$(blue) Starting language test$(reset)" diff --git a/lib/inputstreamhelper/__init__.py b/lib/inputstreamhelper/__init__.py index 3e8c755b..36a9d889 100644 --- a/lib/inputstreamhelper/__init__.py +++ b/lib/inputstreamhelper/__init__.py @@ -512,7 +512,7 @@ def _select_best_chromeos_image(devices): # Select the newest version from distutils.version import LooseVersion # pylint: disable=import-error,no-name-in-module if LooseVersion(device['version']) > LooseVersion(best['version']): - log('{device[hwid]} ({device[version]}) is newer than {best[hwid]} ({best[version]})', # pylint: disable=invalid-format-index + log('{device[hwid]} ({device[version]}) is newer than {best[hwid]} ({best[version]})', device=device, best=best) best = device @@ -520,7 +520,7 @@ def _select_best_chromeos_image(devices): # Select the smallest image (disk space requirement) elif LooseVersion(device['version']) == LooseVersion(best['version']): if int(device['filesize']) + int(device['zipfilesize']) < int(best['filesize']) + int(best['zipfilesize']): - log('{device[hwid]} ({device_size}) is smaller than {best[hwid]} ({best_size})', # pylint: disable=invalid-format-index + log('{device[hwid]} ({device_size}) is smaller than {best[hwid]} ({best_size})', device=device, best=best, device_size=int(device['filesize']) + int(device['zipfilesize']), diff --git a/lib/inputstreamhelper/kodiutils.py b/lib/inputstreamhelper/kodiutils.py index 59a3946c..3ba20435 100644 --- a/lib/inputstreamhelper/kodiutils.py +++ b/lib/inputstreamhelper/kodiutils.py @@ -27,7 +27,7 @@ def has_socks(): if hasattr(has_socks, 'cached'): return getattr(has_socks, 'cached') try: - import socks # noqa: F401; pylint: disable=unused-variable,unused-import + import socks # noqa: F401; pylint: disable=unused-variable,unused-import,useless-suppression except ImportError: has_socks.cached = False return None # Detect if this is the first run diff --git a/lib/inputstreamhelper/unicodehelper.py b/lib/inputstreamhelper/unicodehelper.py index 27cca14d..3945ac44 100644 --- a/lib/inputstreamhelper/unicodehelper.py +++ b/lib/inputstreamhelper/unicodehelper.py @@ -13,6 +13,6 @@ def to_unicode(text, encoding='utf-8', errors='strict'): def from_unicode(text, encoding='utf-8', errors='strict'): """Force unicode to text""" import sys - if sys.version_info.major == 2 and isinstance(text, unicode): # noqa: F821; pylint: disable=undefined-variable + if sys.version_info.major == 2 and isinstance(text, unicode): # noqa: F821; pylint: disable=undefined-variable,useless-suppression return text.encode(encoding, errors) return text diff --git a/test/test_ishelper_android_arm.py b/test/test_ishelper_android_arm.py index 73bd036e..09b9f818 100644 --- a/test/test_ishelper_android_arm.py +++ b/test/test_ishelper_android_arm.py @@ -2,7 +2,7 @@ # Copyright: (c) 2019, Dag Wieers (@dagwieers) # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# pylint: disable=duplicate-code,invalid-name,missing-docstring,protected-access +# pylint: disable=invalid-name,missing-docstring from __future__ import absolute_import, division, print_function, unicode_literals import unittest diff --git a/test/test_ishelper_linux_arm.py b/test/test_ishelper_linux_arm.py index b8581936..bca9ae6a 100644 --- a/test/test_ishelper_linux_arm.py +++ b/test/test_ishelper_linux_arm.py @@ -2,7 +2,7 @@ # Copyright: (c) 2019, Dag Wieers (@dagwieers) # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# pylint: disable=duplicate-code,invalid-name,missing-docstring,protected-access +# pylint: disable=invalid-name,missing-docstring from __future__ import absolute_import, division, print_function, unicode_literals import unittest diff --git a/test/test_ishelper_linux_x64.py b/test/test_ishelper_linux_x64.py index 9d8b24e4..a35ea1a2 100644 --- a/test/test_ishelper_linux_x64.py +++ b/test/test_ishelper_linux_x64.py @@ -2,7 +2,7 @@ # Copyright: (c) 2019, Dag Wieers (@dagwieers) # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# pylint: disable=duplicate-code,invalid-name,missing-docstring,protected-access +# pylint: disable=invalid-name,missing-docstring from __future__ import absolute_import, division, print_function, unicode_literals import unittest diff --git a/test/test_ishelper_macos_x64.py b/test/test_ishelper_macos_x64.py index 4be012c6..9be2b80d 100644 --- a/test/test_ishelper_macos_x64.py +++ b/test/test_ishelper_macos_x64.py @@ -2,7 +2,7 @@ # Copyright: (c) 2019, Dag Wieers (@dagwieers) # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# pylint: disable=duplicate-code,invalid-name,missing-docstring,protected-access +# pylint: disable=invalid-name,missing-docstring from __future__ import absolute_import, division, print_function, unicode_literals import unittest diff --git a/test/test_ishelper_windows_x64.py b/test/test_ishelper_windows_x64.py index e3ccd65c..a7492976 100644 --- a/test/test_ishelper_windows_x64.py +++ b/test/test_ishelper_windows_x64.py @@ -2,7 +2,7 @@ # Copyright: (c) 2019, Dag Wieers (@dagwieers) # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# pylint: disable=duplicate-code,invalid-name,missing-docstring,protected-access +# pylint: disable=invalid-name,missing-docstring from __future__ import absolute_import, division, print_function, unicode_literals import unittest diff --git a/test/test_proxy.py b/test/test_proxy.py index d34a1e3c..56e1588b 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -2,7 +2,7 @@ # Copyright: (c) 2019, Dag Wieers (@dagwieers) # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# pylint: disable=duplicate-code,invalid-name,missing-docstring,protected-access +# pylint: disable=invalid-name,missing-docstring from __future__ import absolute_import, division, print_function, unicode_literals import sys