diff options
author | Ask Solem <ask@celeryproject.org> | 2017-02-16 10:44:48 -0800 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2017-02-16 10:44:48 -0800 |
commit | e6fab2f68b562cf1400bd8167e9b755f0482aafe (patch) | |
tree | b4d6be32dc8c62fa032e3c1a1a74636ac8360a38 /kombu/utils/scheduling.py | |
parent | f2f7c67651106e77fb2db60ded134404ccc0a626 (diff) | |
download | kombu-5.0-devel.tar.gz |
WIP5.0-devel
Diffstat (limited to 'kombu/utils/scheduling.py')
-rw-r--r-- | kombu/utils/scheduling.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kombu/utils/scheduling.py b/kombu/utils/scheduling.py index 74d4f25a..624a06d0 100644 --- a/kombu/utils/scheduling.py +++ b/kombu/utils/scheduling.py @@ -1,8 +1,7 @@ """Scheduling Utilities.""" from itertools import count -from typing import Any, Callable, Iterable, Optional, Sequence, Union +from typing import Any, Callable, Iterable, Sequence, Union from typing import List # noqa - from .imports import symbol_by_name __all__ = [ @@ -24,12 +23,12 @@ class FairCycle: Arguments: fun (Callable): Callback to call. - resources (Sequence[Any]): List of resources. + resources (Sequence): List of resources. predicate (type): Exception predicate. """ def __init__(self, fun: Callable, resources: Sequence, - predicate: Any=Exception) -> None: + predicate: Any = Exception) -> None: self.fun = fun self.resources = resources self.predicate = predicate @@ -72,8 +71,8 @@ class BaseCycle: class round_robin_cycle(BaseCycle): """Iterator that cycles between items in round-robin.""" - def __init__(self, it: Optional[Iterable]=None) -> None: - self.items = list(it if it is not None else []) # type: List + def __init__(self, it: Iterable = None) -> None: + self.items = list(it if it is not None else []) def update(self, it: Sequence) -> None: """Update items from iterable.""" |