diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/utils/randomization.py | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/bot/utils/randomization.py b/bot/utils/randomization.py index 8f47679a..c9eabbd2 100644 --- a/bot/utils/randomization.py +++ b/bot/utils/randomization.py @@ -1,6 +1,7 @@  import itertools  import random -import typing as t +from collections.abc import Iterable +from typing import Any  class RandomCycle: @@ -10,11 +11,11 @@ class RandomCycle:      The iterable is reshuffled after each full cycle.      """ -    def __init__(self, iterable: t.Iterable) -> None: +    def __init__(self, iterable: Iterable):          self.iterable = list(iterable)          self.index = itertools.cycle(range(len(iterable))) -    def __next__(self) -> t.Any: +    def __next__(self) -> Any:          idx = next(self.index)          if idx == 0: | 
