printer.pyi 519 B

12345678910111213141516171819202122232425
  1. from typing import IO, NamedTuple
  2. class Message(NamedTuple):
  3. type: object
  4. data: str | bytes
  5. time: object
  6. name: str | None
  7. colour: object
  8. class Printer:
  9. output: IO[str]
  10. time_format: str
  11. width: int
  12. colour: bool
  13. prefix: bool
  14. _colours_supported: bool
  15. def __init__(
  16. self,
  17. *,
  18. output: IO[str] = ...,
  19. width: int = ...,
  20. colour: bool = ...,
  21. prefix: bool = ...,
  22. ) -> None: ...
  23. def write(self, message: Message) -> None: ...