Emits an error when there is more than just a root field defined for a subclass of RootModel.
(api: CheckerPluginInterface, context: Context)
| 1297 | |
| 1298 | |
| 1299 | def error_extra_fields_on_root_model(api: CheckerPluginInterface, context: Context) -> None: |
| 1300 | """Emits an error when there is more than just a root field defined for a subclass of RootModel.""" |
| 1301 | api.fail('Only `root` is allowed as a field of a `RootModel`', context, code=ERROR_EXTRA_FIELD_ROOT_MODEL) |
| 1302 | |
| 1303 | |
| 1304 | def add_method( |
no test coverage detected