From 9b080b8704c7ab2820d3fc72e691f710b0e3ca73 Mon Sep 17 00:00:00 2001 From: Sergey Vishnikin Date: Fri, 19 Apr 2024 21:42:12 +0200 Subject: [PATCH] Fix "retry_on_error" type annotation --- arq/connections.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arq/connections.py b/arq/connections.py index c1058890..b551ed75 100644 --- a/arq/connections.py +++ b/arq/connections.py @@ -4,7 +4,7 @@ from dataclasses import dataclass from datetime import datetime, timedelta from operator import attrgetter -from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, Union, cast +from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, Type, Union, cast from urllib.parse import parse_qs, urlparse from uuid import uuid4 @@ -50,7 +50,7 @@ class RedisSettings: sentinel_master: str = 'mymaster' retry_on_timeout: bool = False - retry_on_error: Optional[List[Exception]] = None + retry_on_error: Optional[List[Type[Exception]]] = None retry: Optional[Retry] = None @classmethod