From 001c1c4171481a73fef418c7a98405c632e88b32 Mon Sep 17 00:00:00 2001 From: Mix Date: Fri, 4 Mar 2022 19:47:29 +0800 Subject: [PATCH] :label: Fix typing issue caused by hints of httpx ref: https://github.com/encode/httpx/pull/2096 --- nonebot_plugin_gocqhttp/process/download.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nonebot_plugin_gocqhttp/process/download.py b/nonebot_plugin_gocqhttp/process/download.py index d475b2b4..0801f59b 100644 --- a/nonebot_plugin_gocqhttp/process/download.py +++ b/nonebot_plugin_gocqhttp/process/download.py @@ -48,7 +48,9 @@ async def download_gocq(): download_path = Path(tmpdir) / ("temp" + ARCHIVE_EXT) BINARY_DIR.mkdir(parents=True, exist_ok=True) - client = await stack.enter_async_context(AsyncClient(follow_redirects=True)) + client: AsyncClient = await stack.enter_async_context( + AsyncClient(follow_redirects=True) # type:ignore + ) # NOTE: see https://github.com/encode/httpx/pull/2096 url = construct_download_url() logger.info(f"Begin to Download binary from {url}")