text_lint.results.forest.ResultForest

class text_lint.results.forest.ResultForest[Quellcode]

Bases: object

A composite of TreeResult instances.

__init__() None[Quellcode]

Initialize ResultForest instances.

__len__() int[Quellcode]

Implement the len operator for ResultForest instances.

Rückgabe:

The number of trees in this forest.

Rückgabetyp:

int

add(tree: ResultTree | None) None[Quellcode]

Add a ResultTree instance to the ResultForest.

Parameter:

tree (ResultTree | None) – The instance to add.

get(key: AliasTreeValue) ResultTree[Quellcode]

Retrieve a ResultTree instance from the ResultForest.

Parameter:

key (AliasTreeValue) – The value of the ResultTree required.

Rückgabe:

The ResultTree matching the specified key.

Rückgabetyp:

ResultTree

lookup_expression(linter: Linter, lookup_expression: LookupExpression) AliasLookupResult[Quellcode]

Perform a lookup against the ResultForest.

Parameter:
  • linter (Linter) – The linter instance calling this lookup expression.

  • lookup_expression (LookupExpression) – The lookup expression to execute.

Rückgabe:

The evaluated lookup result.

Rückgabetyp:

AliasLookupResult