From 28f6c9c679f56bd964e8ddcc7f98732e9c842794 Mon Sep 17 00:00:00 2001 From: Jan Jurgens Date: Tue, 14 Feb 2023 11:48:16 +0100 Subject: [PATCH] Fixed pre commit issue * Removed unused import * Marked unreachable test code --- src/corsheaders/checks.py | 2 +- tests/test_middleware.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corsheaders/checks.py b/src/corsheaders/checks.py index d4edc646..aa81e050 100644 --- a/src/corsheaders/checks.py +++ b/src/corsheaders/checks.py @@ -39,7 +39,7 @@ def check_settings(**kwargs: Any) -> list[CheckMessage]: ) if not isinstance(conf.CORS_ALLOW_PRIVATE_NETWORK_ACCESS, bool): - errors.append( + errors.append( # type: ignore [unreachable] Error( "CORS_ALLOW_PRIVATE_NETWORK_ACCESS should be a bool.", id="corsheaders.E015", diff --git a/tests/test_middleware.py b/tests/test_middleware.py index 867998b1..510ba226 100644 --- a/tests/test_middleware.py +++ b/tests/test_middleware.py @@ -12,7 +12,6 @@ from corsheaders.middleware import ACCESS_CONTROL_ALLOW_PRIVATE_NETWORK from corsheaders.middleware import ACCESS_CONTROL_EXPOSE_HEADERS from corsheaders.middleware import ACCESS_CONTROL_MAX_AGE -from corsheaders.middleware import ACCESS_CONTROL_REQUEST_PRIVATE_NETWORK from tests.utils import append_middleware from tests.utils import prepend_middleware from tests.utils import temporary_check_request_hander