Skip to content

Commit 3848d6e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2f97a49 commit 3848d6e

19 files changed

+31
-15
lines changed

proxy/testing/test_case.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
"""
1111
import contextlib
1212
import time
13-
import unittest
1413
from typing import Any, Generator, List, Optional
1514

15+
import unittest
16+
1617
from ..common.constants import DEFAULT_TIMEOUT
1718
from ..common.utils import new_socket_connection
1819
from ..plugin import CacheResponsesPlugin

tests/common/test_flags.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
:copyright: (c) 2013-present by Abhinav Singh and contributors.
99
:license: BSD, see LICENSE for more details.
1010
"""
11-
import unittest
1211
from typing import Dict, List
12+
13+
import unittest
1314
from unittest import mock
1415

1516
from proxy.common.constants import PLUGIN_HTTP_PROXY, PY2_DEPRECATION_MESSAGE

tests/common/test_pki.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
import os
1212
import subprocess
1313
import tempfile
14-
import unittest
1514
from typing import Tuple
15+
16+
import unittest
1617
from unittest import mock
1718

1819
from proxy.common import pki

tests/common/test_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:license: BSD, see LICENSE for more details.
1010
"""
1111
import socket
12+
1213
import unittest
1314
from unittest import mock
1415

tests/core/test_acceptor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import multiprocessing
1212
import selectors
1313
import socket
14+
1415
import unittest
1516
from unittest import mock
1617

tests/core/test_connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
"""
1111
import socket
1212
import ssl
13-
import unittest
1413
from typing import Optional, Union
14+
15+
import unittest
1516
from unittest import mock
1617

1718
from proxy.common.constants import DEFAULT_IPV4_HOSTNAME, DEFAULT_IPV6_HOSTNAME, DEFAULT_PORT

tests/core/test_event_dispatcher.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
import os
1313
import queue
1414
import threading
15-
import unittest
1615
from multiprocessing import connection
16+
17+
import unittest
1718
from unittest import mock
1819

1920
from proxy.core.event import EventDispatcher, EventQueue, eventNames

tests/core/test_event_queue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import multiprocessing
1212
import os
1313
import threading
14+
1415
import unittest
1516
from unittest import mock
1617

tests/core/test_event_subscriber.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
import os
1313
import queue
1414
import threading
15-
import unittest
1615
from typing import Any, Dict
16+
17+
import unittest
1718
from unittest import mock
1819

1920
from proxy.core.event import EventDispatcher, EventQueue, EventSubscriber, eventNames

tests/core/test_listener.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
import os
1212
import socket
1313
import tempfile
14-
import unittest
15-
from unittest import mock
1614

1715
import pytest
16+
import unittest
17+
from unittest import mock
1818

1919
from proxy.common._compat import IS_WINDOWS # noqa: WPS436
2020
from proxy.common.flag import FlagParser

tests/http/exceptions/test_http_proxy_auth_failed.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:license: BSD, see LICENSE for more details.
1010
"""
1111
import selectors
12+
1213
import unittest
1314
from unittest import mock
1415

tests/http/test_http_proxy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:license: BSD, see LICENSE for more details.
1010
"""
1111
import selectors
12+
1213
import unittest
1314
from unittest import mock
1415

tests/http/test_http_proxy_tls_interception.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
import selectors
1212
import socket
1313
import ssl
14-
import unittest
1514
import uuid
1615
from typing import Any
16+
17+
import unittest
1718
from unittest import mock
1819

1920
from proxy.common.constants import DEFAULT_CA_FILE

tests/http/test_protocol_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
"""
1111
import base64
1212
import selectors
13-
import unittest
1413
from typing import cast
14+
15+
import unittest
1516
from unittest import mock
1617

1718
from proxy.common.constants import CRLF, PLUGIN_HTTP_PROXY, PLUGIN_PROXY_AUTH, PLUGIN_WEB_SERVER

tests/http/test_web_server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import os
1313
import selectors
1414
import tempfile
15+
1516
import unittest
1617
from unittest import mock
1718

tests/plugin/test_http_proxy_plugins.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
"""
1111
import json
1212
import selectors
13-
import unittest
1413
from pathlib import Path
1514
from typing import cast
16-
from unittest import mock
1715
from urllib import parse as urlparse
1816

17+
import unittest
18+
from unittest import mock
19+
1920
from proxy.common.constants import DEFAULT_HTTP_PORT, PROXY_AGENT_HEADER_VALUE
2021
from proxy.common.flag import FlagParser
2122
from proxy.common.utils import build_http_request, build_http_response, bytes_

tests/plugin/test_http_proxy_plugins_with_tls_interception.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
import selectors
1212
import socket
1313
import ssl
14-
import unittest
1514
from typing import Any, cast
15+
16+
import unittest
1617
from unittest import mock
1718

1819
from proxy.common.flag import FlagParser

tests/test_main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"""
1515
import os
1616
import tempfile
17+
1718
import unittest
1819
from unittest import mock
1920

tests/test_set_open_file_limit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
:copyright: (c) 2013-present by Abhinav Singh and contributors.
99
:license: BSD, see LICENSE for more details.
1010
"""
11+
import pytest
1112
import unittest
1213
from unittest import mock
1314

14-
import pytest
15-
1615
from proxy.common._compat import IS_WINDOWS # noqa: WPS436
1716
from proxy.common.utils import set_open_file_limit
1817

0 commit comments

Comments
 (0)