From d81e98836e9532a4ea8707067f0fec31ea23c606 Mon Sep 17 00:00:00 2001 From: Decrabbit Date: Sun, 19 Jan 2025 22:35:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(app):=20=E4=BF=AE=E6=AD=A3=E5=A4=A7?= =?UTF-8?q?=E9=A9=BC=E5=B3=B0=E8=BD=AC=E8=9B=87=E5=BD=A2=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lagrange/info/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lagrange/info/app.py b/lagrange/info/app.py index 2b5a3e4..ebed874 100644 --- a/lagrange/info/app.py +++ b/lagrange/info/app.py @@ -5,7 +5,7 @@ from .serialize import JsonSerializer -_T = TypeVar('_T', bound=dict[str, Union[int, str]]) +_T = TypeVar("_T", bound=dict[str, Union[int, str]]) _trans_map = { "SsoVersion": "pt_os_version", "WtLoginSdk": "wtlogin_sdk", @@ -21,8 +21,8 @@ def _translate_appinfo(s: _T) -> _T: out[_trans_map[k]] = v else: k = re.sub( - r'([A-Z])([^A-Z]+)', - '_\0', + r"([A-Z])([^A-Z]+)", + r"_\1\2", k ).lstrip("_").lower() out[k] = v