text_lint.operations.lookups.capture.CaptureLookup
- class text_lint.operations.lookups.capture.CaptureLookup(lookup_name: str, lookup_expression: LookupExpression, lookup_params: AliasLookupParams, requesting_operation_name: str)[Quellcode]
Bases:
LookupBaseCaptureLookup operation for ResultForest instances.
- class Parameters[Quellcode]
Bases:
ParametersParameter validation for this operation.
- __init__(lookup_name: str, lookup_expression: LookupExpression, lookup_params: AliasLookupParams, requesting_operation_name: str) None[Quellcode]
Initialize CaptureLookup instances.
- Parameter:
lookup_name (str) – The name of this lookup operation.
lookup_expression (LookupExpression) – The lookup expression this lookup is a part of.
lookup_params (AliasLookupParams) – The parameters being used with this lookup operation.
requesting_operation_name (str) – The name of the validation operation.
- Raises:
LookupFailure
- apply(state: LookupState) None[Quellcode]
Select a capture group from the current ResultForest location.