From d70b481548fab9801725c5de1c28f3457a0bba53 Mon Sep 17 00:00:00 2001 From: Iurii Pliner Date: Sat, 7 Sep 2024 17:07:14 +0100 Subject: [PATCH] Minor fixes --- aio_background/__init__.py | 7 +++---- aio_background/job.py | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/aio_background/__init__.py b/aio_background/__init__.py index d2ddd6b..fcddc0a 100644 --- a/aio_background/__init__.py +++ b/aio_background/__init__.py @@ -1,12 +1,11 @@ import collections import re import sys -from typing import Tuple -from .job import Job # noqa -from .run import combine, run, run_by_cron, run_periodically # noqa +from .job import Job +from .run import combine, run, run_by_cron, run_periodically -__all__: Tuple[str, ...] = ( +__all__: tuple[str, ...] = ( # job.py "Job", # run.py diff --git a/aio_background/job.py b/aio_background/job.py index a6b42d0..16c5ded 100644 --- a/aio_background/job.py +++ b/aio_background/job.py @@ -1,6 +1,5 @@ import abc import asyncio -from typing import Collection class Job(abc.ABC): @@ -36,7 +35,7 @@ async def close(self, *, timeout: float = 0.5) -> bool: class CombinedJob(Job): __slots__ = ("__jobs",) - def __init__(self, jobs: Collection[Job]): + def __init__(self, jobs: tuple[Job, ...]): self.__jobs = jobs @property