Closed ryanzlu closed 3 years ago
The bucket_class in Limiter requires a type as input instead of an object instance of type AbstractBucket.
bucket_class
Limiter
AbstractBucket
Current:
class Limiter: def __init__( self, *rates: RequestRate, bucket_class: AbstractBucket = MemoryQueueBucket, bucket_kwargs=None, ):
Should change to:
from typing import Dict, Union, Type class Limiter: def __init__( self, *rates: RequestRate, bucket_class: Type[AbstractBucket] = MemoryQueueBucket, bucket_kwargs=None, ):
Interesting! Thanks for pointing it out! Will be fixed soon.
solved in 2.3.2
2.3.2
The
bucket_class
inLimiter
requires a type as input instead of an object instance of typeAbstractBucket
.Current:
Should change to: