@@ -88,9 +88,9 @@ def _set_undefined_field_descriptions_from_var_docstrings_impl(cls, klass: Type[
8888
8989 unindented_source = unindent (source )
9090 module = ast .parse (unindented_source )
91- assert isinstance (module , ast .Module )
91+ assert isinstance (module , ast .Module ), module
9292 class_def = module .body [0 ]
93- assert isinstance (class_def , ast .ClassDef )
93+ assert isinstance (class_def , ast .ClassDef ), class_def
9494 if len (class_def .body ) < 2 :
9595 return
9696
@@ -163,8 +163,8 @@ def validation_summaries(self) -> List[ValidationSummary]:
163163 def root (self ) -> Union [AnyUrl , DirectoryPath ]:
164164 return self ._internal_validation_context ["root" ]
165165
166- @abstractmethod
167166 @classmethod
167+ @abstractmethod
168168 def convert_from_older_format (cls , data : BioimageioYamlContent , context : InternalValidationContext ) -> None :
169169 ...
170170
@@ -191,7 +191,7 @@ def __pydantic_init_subclass__(cls, **kwargs: Any):
191191 cls .implemented_format_version_tuple = cast (
192192 Tuple [int , int , int ], tuple (int (x ) for x in cls .implemented_format_version .split ("." ))
193193 )
194- assert len (cls .implemented_format_version_tuple ) == 3
194+ assert len (cls .implemented_format_version_tuple ) == 3 , cls . implemented_format_version_tuple
195195
196196 @classmethod
197197 def _update_context (cls , context : InternalValidationContext , data : BioimageioYamlContent ) -> None :
@@ -228,7 +228,7 @@ def model_validate(
228228
229229 context = get_internal_validation_context (context )
230230 if isinstance (obj , dict ):
231- assert all (isinstance (k , str ) for k in obj )
231+ assert all (isinstance (k , str ) for k in obj ), obj
232232 cls ._update_context (context , obj )
233233
234234 return super ().model_validate (
@@ -349,7 +349,7 @@ def __getattr__(self, name: str):
349349
350350 @classmethod
351351 def __get_pydantic_core_schema__ (cls , source : Type [Any ], handler : GetCoreSchemaHandler ) -> core_schema .CoreSchema :
352- assert issubclass (source , StringNode )
352+ assert issubclass (source , StringNode ), source
353353 return core_schema .with_info_after_validator_function (
354354 cls ._validate ,
355355 core_schema .str_schema (pattern = cls ._pattern ),
0 commit comments