This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new 8807060  Fix a few outcome exception types
8807060 is described below

commit 8807060a52c2b6a0dd8aebcf49388a640f2e845d
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jul 22 15:20:58 2025 +0100

    Fix a few outcome exception types
---
 atr/storage/types.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/atr/storage/types.py b/atr/storage/types.py
index 82e7ee0..56d60d1 100644
--- a/atr/storage/types.py
+++ b/atr/storage/types.py
@@ -102,14 +102,14 @@ class OutcomeException[T, E: Exception = 
Exception](OutcomeCore[T]):
             raise exception_class(str(self.__exception)) from self.__exception
         raise self.__exception
 
-    def exception_or_none(self) -> Exception | None:
+    def exception_or_none(self) -> E | None:
         return self.__exception
 
-    def exception_type_or_none(self) -> type[Exception] | None:
+    def exception_type_or_none(self) -> type[E] | None:
         return type(self.__exception)
 
 
-type Outcome[T] = OutcomeResult[T] | OutcomeException[T, Exception]
+type Outcome[T, E: Exception = Exception] = OutcomeResult[T] | 
OutcomeException[T, E]
 
 
 class Outcomes[T]:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to