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

View File

@ -38,7 +38,8 @@ async def run(
result_coro = core.process_result(oldvers, result_q, entry_waiter) result_coro = core.process_result(oldvers, result_q, entry_waiter)
runner_coro = core.run_tasks(futures) 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") @pytest.fixture(scope="module")
async def get_version(): async def get_version():