text_lint.linter.logging.Logger

class text_lint.linter.logging.Logger(linter: Linter)[source]

Bases: object

Console logger.

__call__(obj: str, index: None = None, indent: bool = False, section: bool = False) None[source]
__call__(obj: AssertionBase, index: int, indent: Literal[False] = False, section: Literal[False] = False) None
__call__(obj: ValidatorBase, index: None = None, indent: Literal[False] = False, section: Literal[False] = False) None

Log the given object to the console.

Parameters:
  • obj – The object being logged.

  • index – The assertion index when logging assertion operations.

  • index – Optionally indent when logging strings.

  • section – Optionally format as a section header logging strings.

__init__(linter: Linter) None[source]

Initialize Logger instances.

Parameters:

linter (Linter) – The linter instance being logged.