Skip to content

Commit f7b3056

Browse files
committed
Add missing type hints
1 parent 0c09c85 commit f7b3056

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scrapy_playwright/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ async def _process_queue(cls) -> None:
158158
cls._coro_queue.task_done()
159159

160160
@classmethod
161-
def _deferred_from_coro(cls, coro) -> Deferred:
161+
def _deferred_from_coro(cls, coro: Awaitable) -> Deferred:
162162
dfd: Deferred = Deferred()
163163
queue_item = _QueueItem(coro=coro, promise=dfd)
164164
asyncio.run_coroutine_threadsafe(cls._coro_queue.put(queue_item), cls._loop)
165165
return dfd
166166

167167
@classmethod
168-
def _future_from_coro(cls, coro) -> asyncio.Future:
168+
def _future_from_coro(cls, coro: Awaitable) -> asyncio.Future:
169169
target_loop = asyncio.get_running_loop() # Scrapy thread loop
170170
future: asyncio.Future = asyncio.Future()
171171
queue_item = _QueueItem(coro=coro, promise=future, loop=target_loop)

0 commit comments

Comments
 (0)