Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 17, 2024
1 parent 3a77cc2 commit c8d9f8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ dependencies = [
# NOTE: 👇
# The versions of `black`, `ruff`, `codespell`, must be consistent with the `.pre-commit-config.yaml`.
# Don't edit them manually, use `pre-commit run ver_sync` instead.
"black==24.3.0",
"ruff==0.3.4",
"codespell==2.2.6",
"black==24.4.2",
"ruff==0.4.9",
"codespell==2.3.0",
# Don't write comments on these lines, because they will be removed by `pre-commit run ver_sync`.
# NOTE: 👆

Expand Down
4 changes: 2 additions & 2 deletions src/fastapi_proxy_lib/core/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,10 @@ async def send_request_to_target( # pyright: ignore [reportIncompatibleMethodOv

# httpx.stream()
# refer to: https://www.python-httpx.org/api/#helper-functions
client_request_headers: "HeaderTypes" = _change_client_header(
client_request_headers: HeaderTypes = _change_client_header(
headers=websocket.headers, target_url=target_url
)
client_request_params: "QueryParamTypes" = websocket.query_params
client_request_params: QueryParamTypes = websocket.query_params

# TODO: 是否可以不检查http版本?
check_result = check_http_version(websocket.scope, SUPPORTED_WS_HTTP_VERSIONS)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ async def test_ws_proxy(self, tool_4_test_fixture: Tool4TestFixture) -> None:
# NOTE: 这个测试不放在 `test_target_server_shutdown_abnormally` 来做
# 是因为这里已经有现成的target server,放在这里测试可以节省启动服务器时间

aconnect_ws_subprocess_queue: "Queue[str]" = Queue()
aconnect_ws_subprocess_queue: Queue[str] = Queue()

kwargs_async_client = {"proxies": NO_PROXIES}
kwargs_aconnect_ws = {"url": proxy_server_base_url + "do_nothing"}
Expand Down Expand Up @@ -256,7 +256,7 @@ async def test_target_server_shutdown_abnormally(
需要在 60s 内向客户端发送 1011 关闭代码.
"""
subprocess_queue: "Queue[str]" = Queue()
subprocess_queue: Queue[str] = Queue()

target_ws_server_subprocess = Process(
target=_subprocess_run_echo_ws_uvicorn_server,
Expand Down

0 comments on commit c8d9f8f

Please sign in to comment.