text_lint.linter.states.validator.ValidatorState

class text_lint.linter.states.validator.ValidatorState(linter: Linter)[Quellcode]

Bases: StateBase

State for validator operations.

__init__(linter: Linter) None[Quellcode]

Initialize ValidatorState instances.

Parameter:

linter (Linter) – The linter instance being encapsulated.

fail(translated_description: str, translated_detail: str) None[Quellcode]

Raise an exception indicating an operation has failed.

Parameter:
  • translated_description (str) – A translated description of the failure.

  • translated_detail (str) – Translated details of the failure.

lookup_expression(lookup_expression: LookupExpression) AliasLookupResult[Quellcode]

Perform the given lookup expression.

Parameter:

lookup_expression (LookupExpression) – The lookup expression to execute.

Rückgabe:

The calculated lookup result.

Rückgabetyp:

AliasLookupResult

save(tree: ResultTree) None[Quellcode]

Save the given result tree.

Parameter:

tree (ResultTree) – The result tree to save in the result forest.