Add _write method to flake8.formatting.BaseFormatter (#12312)

It is very useful for real-life custom formatters. Example: 470d811746/wemake_python_styleguide/formatter.py (L92-L96)

Definition: 65a38c42a7/src/flake8/formatting/base.py (L173-L178)
This commit is contained in:
sobolevn
2024-07-10 12:41:40 +03:00
committed by GitHub
parent 9bf9d1571e
commit e8cc1e46fe

View File

@@ -21,4 +21,5 @@ class BaseFormatter:
def show_benchmarks(self, benchmarks: list[tuple[str, float]]) -> None: ...
def show_source(self, error: Violation) -> str | None: ...
def write(self, line: str | None, source: str | None) -> None: ...
def _write(self, output: str) -> None: ...
def stop(self) -> None: ...