fix: change return type

This commit is contained in:
aclist committed 2025-07-26 02:45:51 +09:00
1 parent 235f4bca37
commit ae67124c10
1 file changed
+5 -4
+5 -4
View File
@@ -5,10 +5,11 @@ import socket
import subprocess import subprocess
import sys import sys
import typing # noqa import typing # noqa
from typing import Union
from dataclasses import dataclass
from urllib import request, parse from urllib import request, parse
from urllib.error import HTTPError from urllib.error import HTTPError
from dataclasses import dataclass from typing import Union
sys.path.append("a2s") sys.path.append("a2s")
import a2s # noqa import a2s # noqa
@@ -173,10 +174,10 @@ def query_direct(ip: str, qport: int) -> dict | None:
class Res: class Res:
status: int status: int
parsed: bool parsed: bool
json: str json: Union[str, None]
def query_api(key: str, param: str) -> "HTTPResponse": def query_api(key: str, param: str) -> Res:
LIMIT = 10000 LIMIT = 10000
url = "https://api.steampowered.com/IGameServersService/GetServerList/v1/?" url = "https://api.steampowered.com/IGameServersService/GetServerList/v1/?"