From df65b480294a9d752fbcd09fb380e85cb457b6e7 Mon Sep 17 00:00:00 2001 From: John Kurkowski Date: Sat, 24 Oct 2020 14:09:39 -0700 Subject: [PATCH] Remove unused lint disables --- conftest.py | 4 ---- tests/custom_suffix_test.py | 2 -- tests/main_test.py | 8 +++----- tests/test_parallel.py | 4 ++-- tldextract/tldextract.py | 1 - 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/conftest.py b/conftest.py index 95ce8c70..1ae092bf 100644 --- a/conftest.py +++ b/conftest.py @@ -1,7 +1,3 @@ '''py.test standard config file.''' -# pylint: disable=invalid-name - collect_ignore = ('setup.py',) - -# pylint: enable=invalid-name diff --git a/tests/custom_suffix_test.py b/tests/custom_suffix_test.py index 9a862ae3..f0621932 100644 --- a/tests/custom_suffix_test.py +++ b/tests/custom_suffix_test.py @@ -11,7 +11,6 @@ ) EXTRA_SUFFIXES = ['foo1', 'bar1', 'baz1'] -# pylint: disable=invalid-name extract_using_fake_suffix_list = tldextract.TLDExtract( cache_dir=tempfile.mkdtemp(), suffix_list_urls=[FAKE_SUFFIX_LIST_URL] @@ -25,7 +24,6 @@ suffix_list_urls=[FAKE_SUFFIX_LIST_URL], extra_suffixes=EXTRA_SUFFIXES ) -# pylint: enable=invalid-name def test_private_extraction(): diff --git a/tests/main_test.py b/tests/main_test.py index 5e25833b..96c55339 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -11,7 +11,6 @@ from tldextract.tldextract import ExtractResult -# pylint: disable=invalid-name extract = tldextract.TLDExtract(cache_dir=tempfile.mkdtemp()) extract_no_cache = tldextract.TLDExtract(cache_dir=False) extract_using_real_local_suffix_list = tldextract.TLDExtract(cache_dir=tempfile.mkdtemp()) @@ -20,7 +19,6 @@ cache_dir=None, suffix_list_urls=None ) -# pylint: enable=invalid-name def assert_extract( # pylint: disable=missing-docstring @@ -236,11 +234,11 @@ def test_result_as_dict(): assert result._asdict() == expected_dict -@responses.activate # pylint: disable=no-member +@responses.activate def test_cache_timeouts(tmpdir): server = 'http://some-server.com' - responses.add( # pylint: disable=no-member - responses.GET, # pylint: disable=no-member + responses.add( + responses.GET, server, status=408 ) diff --git a/tests/test_parallel.py b/tests/test_parallel.py index c7ea3353..bd451e92 100644 --- a/tests/test_parallel.py +++ b/tests/test_parallel.py @@ -36,8 +36,8 @@ def _run_extractor(cache_dir): @responses.activate def test_cache_cleared_by_other_process(tmpdir, monkeypatch): """Simulate a file being deleted after we check for existence but before we try to delete it""" - responses.add( # pylint: disable=no-member - responses.GET, # pylint: disable=no-member + responses.add( + responses.GET, PUBLIC_SUFFIX_LIST_URLS[0], status=208, body="uk.com" diff --git a/tldextract/tldextract.py b/tldextract/tldextract.py index 8e808995..dcf12cd2 100644 --- a/tldextract/tldextract.py +++ b/tldextract/tldextract.py @@ -266,7 +266,6 @@ def _get_tld_extractor(self): 2. Local system _cache file 3. Remote PSL, over HTTP 4. Bundled PSL snapshot file""" - # pylint: disable=no-else-return if self._extractor: return self._extractor