from io import StringIO
from logging import StreamHandler
from typing import Literal, Sequence

from nagiosplugin.check import Check

def filter_output(output: str, filtered: str) -> str: ...

class Output:

    ILLEGAL: Literal["|"] = ...

    logchan: StreamHandler[StringIO]
    verbose: int
    status: str
    out: list[str]
    warnings: list[str]
    longperfdata: list[str]

    def __init__(
        self, logchan: StreamHandler[StringIO], verbose: int = ...
    ) -> None: ...
    def add(self, check: Check) -> None: ...
    def format_status(self, check: Check) -> str: ...
    def format_perfdata(self, check: Check, linebreak: int = ...) -> str: ...
    def add_longoutput(self, text: str | Sequence[str]) -> None: ...
    def __str__(self) -> str: ...
