Skip to content

Commit 67304b6

Browse files
add code field
1 parent 42f07ea commit 67304b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/models-library/src/models_library/errors_classes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ def __missing__(self, key):
1010

1111
class OsparcErrorMixin(PydanticErrorMixin):
1212
msg_template: str
13+
code: str # type: ignore[assignment]
1314

1415
def __new__(cls, *_args, **_kwargs):
1516
if not hasattr(cls, "code"):
16-
cls.code = cls._get_full_class_name() # type: ignore[assignment]
17+
cls.code = cls._get_full_class_name()
1718
return super().__new__(cls)
1819

1920
def __init__(self, **ctx: Any) -> None:
2021
self.__dict__ = ctx
21-
super().__init__(message=self._build_message(), code=self.code)
22+
super().__init__(message=self._build_message(), code=self.code) # type: ignore[arg-type]
2223

2324
def __str__(self) -> str:
2425
return self._build_message()

0 commit comments

Comments
 (0)