From f4467a8d6c8d13710be91241998eb6e51633ec1e Mon Sep 17 00:00:00 2001 From: Parker Hancock <633163+parkerhancock@users.noreply.github.com> Date: Fri, 8 Dec 2023 10:57:32 -0600 Subject: [PATCH] make linters happy --- tests/integration/test_httpx.py | 2 -- tests/integration/test_proxy.py | 3 +-- vcr/serializers/compat.py | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/integration/test_httpx.py b/tests/integration/test_httpx.py index cf1f6c21..4bedc8a2 100644 --- a/tests/integration/test_httpx.py +++ b/tests/integration/test_httpx.py @@ -1,4 +1,3 @@ -import os import pytest @@ -7,7 +6,6 @@ asyncio = pytest.importorskip("asyncio") httpx = pytest.importorskip("httpx") -from vcr.stubs.httpx_stubs import HTTPX_REDIRECT_PARAM # noqa: E402 @pytest.fixture(params=["https", "http"]) diff --git a/tests/integration/test_proxy.py b/tests/integration/test_proxy.py index c450ab23..7366d33e 100644 --- a/tests/integration/test_proxy.py +++ b/tests/integration/test_proxy.py @@ -1,9 +1,8 @@ """Test using a proxy.""" import http.server -import multiprocessing -import threading import socketserver +import threading from urllib.request import urlopen import pytest diff --git a/vcr/serializers/compat.py b/vcr/serializers/compat.py index 0ab358d2..65ba96fc 100644 --- a/vcr/serializers/compat.py +++ b/vcr/serializers/compat.py @@ -56,7 +56,7 @@ def convert_body_to_unicode(resp): If the request or responses body is bytes, decode it to a string (for python3 support) """ - if type(resp) is not dict: + if not isinstance(resp, dict): # Some of the tests just serialize and deserialize a string. return _convert_string_to_unicode(resp) else: