yera.apps.typing.validate
Validation: checking that an app's annotations are drawn from the supported set.
Symbols
assert_value_is_return_type
assert_value_is_return_type(
return_value: Any,
return_cls: type | None,
meta: AppMetadata,
) → NoneCheck that an app's return value matches its declared return type.
Raises
If the value does not match the declared return type.
If the app declared no return type but returned
a non-None value.
is_dataframe_type
is_dataframe_type(
type_hint: Any,
) → boolCheck if type is pandas DataFrame without importing pandas.
is_enum_type
is_enum_type(
expected_type: Any,
) → boolCheck if type is an Enum subclass.
is_struct_type
is_struct_type(
expected_type: Any,
) → boolCheck if type is a Struct subclass.
validate_signature
validate_signature(
signature: inspect.Signature,
type_hints: dict[str, Any],
identifier: str,
) → NoneValidate that all type hints in a signature are allowed.
Parameters
The inspected function signature.
Resolved type hints from get_type_hints.
The agent's module-qualified identifier, used in error messages.
Raises
If any parameter uses *args or **kwargs syntax;
these cannot be statically analysed by the SIGL compiler.
If any parameter is missing a type hint, or if any parameter or return type uses an unsupported type.