error_from_attributes
Emits an error when the model does not have from_attributes=True.
def error_from_attributes(
model_name: str,
api: CheckerPluginInterface,
context: Context
) - > None
Emits an error when the model does not have from_attributes=True.
Parameters
| Name | Type | Description |
|---|---|---|
| model_name | str | The name of the Pydantic model being validated. |
| api | CheckerPluginInterface | The plugin interface used to emit the validation error message. |
| context | Context | The linting context providing location information for the error report. |
Returns
| Type | Description |
|---|---|
None | Nothing is returned; the function performs a side effect by reporting a failure to the plugin interface. |