chore: clear typehinting errors

This commit is contained in:
aclist committed 2026-05-13 20:13:06 +09:00
1 parent fe0a6711f0
commit 866c88fbb0
14 files changed
+65 -43

No files matched your search

+3 -3
View File
@@ -81,9 +81,9 @@ class A2SInfo:
def get_info(self) -> a2s.SourceInfo | None:
return self.info
def as_row(self) -> dict[str, Any] | None:
def as_row(self) -> dict[str, Any]:
if self.info is None:
return None
raise AttributeError("No record to convert")
ip = self.record.ip
qport = self.record.qport
return source_info_to_dict(ip, qport, self.info)
@@ -239,7 +239,7 @@ def parse_json(json: list) -> list:
return rows
def source_info_to_dict(ip: str, qport: int, info: "SourceInfo") -> dict[str, Any]:
def source_info_to_dict(ip: str, qport: int, info: "SourceInfo") -> dict[str, Any] | None:
try:
name = info.server_name
mapname = info.map_name