Skip to content

Commit 2430e2e

Browse files
committed
ref(worker): Add type parameters for AsyncWorker variables
GH-4581
1 parent 0f63d24 commit 2430e2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sentry_sdk/worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ def _target(self) -> None:
176176

177177
class AsyncWorker(Worker):
178178
def __init__(self, queue_size: int = DEFAULT_QUEUE_SIZE) -> None:
179-
self._queue: asyncio.Queue = asyncio.Queue(queue_size)
180-
self._task: Optional[asyncio.Task] = None
179+
self._queue: asyncio.Queue[Callable[[], Any]] = asyncio.Queue(queue_size)
180+
self._task: Optional[asyncio.Task[None]] = None
181181
# Event loop needs to remain in the same process
182182
self._task_for_pid: Optional[int] = None
183183
self._loop: Optional[asyncio.AbstractEventLoop] = None

0 commit comments

Comments
 (0)