This commit is contained in:
2026-09-07 21:22:51 +08:00
parent 9778d54f3d
commit ba61ed5de7
28 changed files with 303 additions and 64 deletions

View File

@@ -1,5 +1,3 @@
from __future__ import annotations
import json
from dataclasses import asdict, is_dataclass
from typing import Any
@@ -33,13 +31,13 @@ class HTTPClient:
def close(self) -> None:
self.http.close()
def __enter__(self) -> "HTTPClient":
def __enter__(self) -> HTTPClient:
return self
def __exit__(self, *_args: object) -> None:
self.close()
def set_account_type(self, account_type: str) -> "HTTPClient":
def set_account_type(self, account_type: str) -> HTTPClient:
if account_type.strip():
self.account_type = account_type
return self