[BugFix][Typing] Fix Imprecise Type Annotations (#15208)

Signed-off-by: Wang Ran (汪然) <wrran@outlook.com>
This commit is contained in:
Wang Ran (汪然) 2025-03-23 00:05:03 +08:00 committed by GitHub
parent eb63ea1e18
commit dd861b992f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -212,9 +212,9 @@ class BackgroundResources:
"""Used as a finalizer for clean shutdown, avoiding
circular reference back to the client object."""
ctx: Union[zmq.Context] = None
output_socket: Union[zmq.Socket, zmq.asyncio.Socket] = None
input_socket: Union[zmq.Socket, zmq.asyncio.Socket] = None
ctx: zmq.Context
output_socket: Optional[Union[zmq.Socket, zmq.asyncio.Socket]] = None
input_socket: Optional[Union[zmq.Socket, zmq.asyncio.Socket]] = None
proc_handle: Optional[BackgroundProcHandle] = None
shutdown_path: Optional[str] = None