1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: =?utf-8?q?Armin_T=C3=A4nzer?= <armin.taenzer@tngtech.com>
Date: Fri, 11 Apr 2025 15:12:56 +0200
Subject: [issue-844] Update excepted typecheck error after beartype update
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
---
src/spdx_tools/common/typing/dataclass_with_properties.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/spdx_tools/common/typing/dataclass_with_properties.py b/src/spdx_tools/common/typing/dataclass_with_properties.py
index 3f13950..e0b5c96 100644
--- a/src/spdx_tools/common/typing/dataclass_with_properties.py
+++ b/src/spdx_tools/common/typing/dataclass_with_properties.py
@@ -4,7 +4,7 @@
from dataclasses import dataclass
from beartype import beartype
-from beartype.roar import BeartypeCallHintException
+from beartype.roar import BeartypeCallHintParamViolation
def dataclass_with_properties(cls):
@@ -30,7 +30,7 @@ def make_setter(field_name, field_type):
def set_field_with_error_conversion(self, value: field_type):
try:
set_field(self, value)
- except BeartypeCallHintException as err:
+ except BeartypeCallHintParamViolation as err:
error_message: str = f"SetterError {self.__class__.__name__}: {err}"
# As setters are created dynamically, their argument name is always "value". We replace it by the
|