chore: upgrade mypy and add type guards (#16227)

This commit is contained in:
Ville Brofeldt
2021-08-14 06:31:45 +03:00
committed by GitHub
parent 9b2dffeb1d
commit d46dc9aa45
9 changed files with 29 additions and 18 deletions

View File

@@ -73,7 +73,7 @@ class AsyncQueryManager:
def __init__(self) -> None:
super().__init__()
self._redis: redis.Redis
self._redis: redis.Redis # type: ignore
self._stream_prefix: str = ""
self._stream_limit: Optional[int]
self._stream_limit_firehose: Optional[int]
@@ -100,7 +100,7 @@ class AsyncQueryManager:
"Please provide a JWT secret at least 32 bytes long"
)
self._redis = redis.Redis( # type: ignore
self._redis = redis.Redis(
**config["GLOBAL_ASYNC_QUERIES_REDIS_CONFIG"], decode_responses=True
)
self._stream_prefix = config["GLOBAL_ASYNC_QUERIES_REDIS_STREAM_PREFIX"]