chore: partially drop Union typehint

This commit is contained in:
aclist 2026-05-01 20:31:49 +09:00
parent 51ccdf7caa
commit e6d3775fd0
2 changed files with 6 additions and 3 deletions

View File

@ -1,12 +1,15 @@
import logging
import requests
from typing import Optional
from typing import Optional, TYPE_CHECKING
from dzgui.const.constants import APP_NAME
from dzgui.const.endpoints import BM_SERVERS
logger = logging.getLogger(APP_NAME)
if TYPE_CHECKING:
from dzgui.api.servers import Record
def get_attributes(key: str, uid: int) -> str:
# TODO: handle if key is not set

View File

@ -1,4 +1,4 @@
from typing import Union, TYPE_CHECKING
from typing import TYPE_CHECKING
import gi
@ -94,7 +94,7 @@ class Emitter(GObject.GObject):
),
)
def distcalc_ended(
self, dist: Union[str, None], context: Union["ServerTab", "NotebookPage"]
self, dist: str | None, context: "ServerTab | NotebookPage"
) -> None:
pass