Skip to main content

error_extra_fields_on_root_model

Emits an error when there is more than just a root field defined for a subclass of RootModel.

def error_extra_fields_on_root_model(
api: CheckerPluginInterface,
context: Context
) - > None

Emits an error when there is more than just a root field defined for a subclass of RootModel.

Parameters

NameTypeDescription
apiCheckerPluginInterfaceThe plugin interface used to report the validation failure to the static analysis tool.
contextContextThe current linting context containing location information for the error report.

Returns

TypeDescription
NoneNothing is returned; the function performs a side effect of reporting a validation error.