From 03fb1120e08725bbe7fe8f82543aae4e3257df46 Mon Sep 17 00:00:00 2001 From: Benjamin Bolte Date: Sun, 22 Sep 2024 18:48:21 +0800 Subject: [PATCH] stop surpressing errors --- linguaphoto/crud/base.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linguaphoto/crud/base.py b/linguaphoto/crud/base.py index d45cce7..d298c11 100644 --- a/linguaphoto/crud/base.py +++ b/linguaphoto/crud/base.py @@ -64,8 +64,11 @@ async def __aenter__(self) -> Self: return self async def __aexit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None - ) -> bool | None: + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + traceback: TracebackType | None, + ) -> None: # Check if exc_type is None before using issubclass exception_type = exc_type if exc_type is not None and issubclass(exc_type, Exception) else None exception_value = exc_value if isinstance(exc_value, Exception) else None @@ -76,8 +79,6 @@ async def __aexit__( if self.__s3: await self.__s3.__aexit__(exception_type, exception_value, traceback) - return True - def _validate_item(self, data: dict[str, Any], item_class: type[T]) -> T: if (item_type := data.pop("type")) != item_class.__name__: raise InternalError(f"Item type {str(item_type)} is not a {item_class.__name__}")