text_lint.exceptions.assertions.AssertionViolation
- class text_lint.exceptions.assertions.AssertionViolation(assertion: AssertionBase, expected: str, textfile: TextFileSequencer)[Quellcode]
Bases:
AssertionExceptionBaseRaised when a parser assertion fails.
- __init__(assertion: AssertionBase, expected: str, textfile: TextFileSequencer) None[Quellcode]
Initialize AssertionViolation exceptions.
- Parameter:
assertion (AssertionBase) – The assertion operation with the violation.
expected (str) – The expected string content.
textfile (TextFileSequencer) – The textfile sequencer object being used.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.