diff --git a/tenacity/retry.py b/tenacity/retry.py index f792459..d5f82cd 100644 --- a/tenacity/retry.py +++ b/tenacity/retry.py @@ -25,6 +25,7 @@ if sys.version_info < (3, 11): from exceptiongroup import BaseExceptionGroup + class retry_base(abc.ABC): """Abstract base class for retry strategies.""" diff --git a/tests/test_tenacity.py b/tests/test_tenacity.py index d31e11a..88547e4 100644 --- a/tests/test_tenacity.py +++ b/tests/test_tenacity.py @@ -1095,7 +1095,7 @@ def test_retry_if_exception_of_type_exceptiongroup(self): with pytest.raises(ExceptionGroup): self.assertTrue( _retryable_test_with_exception_type_io( - NoExceptionGroupAfterCount(5, exceptions=(IOError(),ValueError())) + NoExceptionGroupAfterCount(5, exceptions=(IOError(), ValueError())) ) ) # not supported @@ -1108,8 +1108,6 @@ def test_retry_if_exception_of_type_exceptiongroup(self): ) ) - - def test_retry_except_exception_of_type(self): self.assertTrue( _retryable_test_if_not_exception_type_io(NoNameErrorAfterCount(5))