From bdaa6f309c62465daa50a7759c9508f4a9472279 Mon Sep 17 00:00:00 2001 From: John Kurkowski Date: Wed, 29 Dec 2021 17:38:18 -0800 Subject: [PATCH] Fix lint disable --- tests/main_test.py | 5 ++++- tldextract/cache.py | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/main_test.py b/tests/main_test.py index 7f13671f..d5e0795d 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -23,7 +23,7 @@ ) -def assert_extract( # pylint: disable=missing-docstring +def assert_extract( url, expected_domain_data, expected_ip_data="", @@ -35,6 +35,9 @@ def assert_extract( # pylint: disable=missing-docstring extract_using_fallback_to_snapshot_no_cache, ), ): + """Test helper to compare all the expected and actual attributes and + properties of an extraction. Runs the same comparison across several + permutations of tldextract instance configurations.""" ( expected_fqdn, expected_subdomain, diff --git a/tldextract/cache.py b/tldextract/cache.py index c69369ef..371ae07e 100644 --- a/tldextract/cache.py +++ b/tldextract/cache.py @@ -97,9 +97,7 @@ def get(self, namespace, key): return json.load(cache_file) except (OSError, ValueError) as exc: LOG.error("error reading TLD cache file %s: %s", cache_filepath, exc) - raise KeyError( # pylint: disable=raise-missing-from - "namespace: " + namespace + " key: " + repr(key) - ) + raise KeyError("namespace: " + namespace + " key: " + repr(key)) from None def set(self, namespace, key, value): """Set a value in the disk cache"""