krrood.code_generation.exceptions#

Exceptions raised by the code-generation package.

Exceptions#

FunctionMissingAnnotationsError

Raised when a callable lacks a type annotation required for generation.

Module Contents#

exception krrood.code_generation.exceptions.FunctionMissingAnnotationsError#

Bases: krrood.exceptions.DataclassException

Raised when a callable lacks a type annotation required for generation.

function: Callable#

The callable that is missing an annotation.

missing_parameter_name: str | None = None#

The parameter whose annotation is missing, or None when the return annotation is the one missing.

error_message() str#
Returns:

A human-readable description of what went wrong.

suggest_correction() str#
Returns:

Advice on how to fix the error, or an empty string if there is no specific advice.