text_lint.operations.validators.expressions.bases.expression_base.ExpressionBase

class text_lint.operations.validators.expressions.bases.expression_base.ExpressionBase[source]

Bases: ABC

Base class for mathematical expressions.

abstract apply(value_a: float, value_b: float) float | bool[source]

Apply the mathematical operator to these two values.

Parameters:
  • value_a (float) – The first value the operator will apply to.

  • value_b (float) – The second value the operator will apply to.

Returns:

The result of the operation.

Return type:

float | bool