fix types and tests

This commit is contained in:
lilydjwg 2022-01-20 16:38:10 +08:00
parent 112c916a6d
commit 1fb3c970cf
2 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,7 @@ from __future__ import annotations
import sys
import argparse
import asyncio
from typing import Coroutine
from typing import Coroutine, Tuple
from pathlib import Path
import structlog
@ -87,9 +87,9 @@ def main() -> None:
sys.exit(3)
async def run(
result_coro: Coroutine[None, None, VersData],
result_coro: Coroutine[None, None, Tuple[VersData, bool]],
runner_coro: Coroutine[None, None, None],
) -> VersData:
) -> Tuple[VersData, bool]:
result_fu = asyncio.create_task(result_coro)
runner_fu = asyncio.create_task(runner_coro)
await runner_fu

View File

@ -38,7 +38,8 @@ async def run(
result_coro = core.process_result(oldvers, result_q, entry_waiter)
runner_coro = core.run_tasks(futures)
return await main.run(result_coro, runner_coro)
vers, _has_failures = await main.run(result_coro, runner_coro)
return vers
@pytest.fixture(scope="module")
async def get_version():