From d8698cbdc67375c775be41a2946a61008027593a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bol=C3=ADvar?= Date: Wed, 8 Jul 2020 14:55:14 -0700 Subject: [PATCH] sanitylib: pacify pylint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to our compliance checks, we have 'useless-suppression' and 'unused-import' on our hands: W0611: Unused CLoader imported from yaml as Loader W0611: Unused Loader imported from yaml I0021: Useless suppression of 'unsubscriptable-object' Signed-off-by: Martí Bolívar --- scripts/sanity_chk/sanitylib.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/sanity_chk/sanitylib.py b/scripts/sanity_chk/sanitylib.py index 7db30f440f1..0ebe6725632 100644 --- a/scripts/sanity_chk/sanitylib.py +++ b/scripts/sanity_chk/sanitylib.py @@ -34,11 +34,10 @@ import yaml try: # Use the C LibYAML parser if available, rather than the Python parser. # It's much faster. - from yaml import CLoader as Loader from yaml import CSafeLoader as SafeLoader from yaml import CDumper as Dumper except ImportError: - from yaml import Loader, SafeLoader, Dumper + from yaml import SafeLoader, Dumper try: import serial @@ -1470,9 +1469,6 @@ Tests should reference the category and subsystem with a dot as a separator. 'offset': 0} with contextlib.closing(mmap.mmap(**mmap_args)) as main_c: - # contextlib makes pylint think main_c isn't subscriptable - # pylint: disable=unsubscriptable-object - suite_regex_match = suite_regex.search(main_c) if not suite_regex_match: # can't find ztest_test_suite, maybe a client, because