text_lint.schema.bases.section_base.SchemaSectionBase
- class text_lint.schema.bases.section_base.SchemaSectionBase(schema: Schema)[Quellcode]
Bases:
Generic[TypeOperation]A section of the schema file containing operation definitions.
- __init__(schema: Schema) None[Quellcode]
Initialize SchemaSectionBase instances.
- Parameter:
schema (Schema) – The schema instance this section is found in.
- hook_create_operation_instance(operation_class: Type[TypeOperation], yaml_definition: Dict[str, Any]) Dict[str, Any][Quellcode]
Modify the yaml definition prior to creating the operation instance.
- Parameter:
operation_class (Type[TypeOperation]) – The operation class being created.
yaml_definition (Dict[str, Any]) – The YAML config for this operation.
- Rückgabe:
The modified YAML config.
- Rückgabetyp:
Dict[str, Any]
- hook_load_operation_instances(operation_instances: List[TypeOperation], operation_definitions: List[Dict[str, Any]]) List[TypeOperation][Quellcode]
Modify the operation instances prior to returning loaded results.
- Parameter:
operation_instances (List[TypeOperation]) – The newly created operation instances.
operation_definitions (List[Dict[str, Any]]) – The YAML config for the operations.
- Rückgabe:
The modified operation instances.
- Rückgabetyp:
List[TypeOperation]
- load(source: List[Dict[str, Any]]) List[TypeOperation][Quellcode]
Load the operation instances from the schema.
- Parameter:
source (List[Dict[str, Any]]) – The YAML source that defines the section’s operations.
- Rückgabe:
The new operation instances.
- Raises:
SchemaError
- Rückgabetyp:
List[TypeOperation]