From c32ed4b81d23fa734da768753b566466c23a8d7a Mon Sep 17 00:00:00 2001 From: seria Date: Sun, 14 Apr 2024 09:02:51 +0900 Subject: [PATCH] Revert qrcode dependency fix (#180) --- genshin/client/components/geetest/client.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/genshin/client/components/geetest/client.py b/genshin/client/components/geetest/client.py index c594ecc1..dbc9245c 100644 --- a/genshin/client/components/geetest/client.py +++ b/genshin/client/components/geetest/client.py @@ -9,6 +9,9 @@ import aiohttp import aiohttp.web +import qrcode +import qrcode.image.pil +from qrcode.constants import ERROR_CORRECT_L from genshin import constants, errors from genshin.client import routes @@ -524,10 +527,6 @@ async def login_with_qrcode(self) -> typing.Dict[str, str]: Returns cookies. """ - import qrcode - import qrcode.image.pil - from qrcode.constants import ERROR_CORRECT_L - creation_result = await self._create_qrcode() qrcode_: qrcode.image.pil.PilImage = qrcode.make(creation_result.url, error_correction=ERROR_CORRECT_L) # type: ignore qrcode_.show()