diff --git a/src/valuefragments/contextmanagers.py b/src/valuefragments/contextmanagers.py index a372dc1..a2eb206 100644 --- a/src/valuefragments/contextmanagers.py +++ b/src/valuefragments/contextmanagers.py @@ -6,7 +6,7 @@ import sys import time from types import TracebackType -from typing import Any, Literal, Optional, TextIO, Type +from typing import Any, BinaryIO, Literal, Optional, TextIO, Type # from typing_extensions import Self from .helpers import ( # pylint: disable=relative-beyond-top-level] @@ -46,6 +46,31 @@ def write(self: NoOutput, s: Any) -> int: # pylint: disable=invalid-name,unused def flush(self: NoOutput) -> None: """Flush attribute: Needed but does nothing.""" + # buffer | | encoding | | errors | | line_buffering newlines + + @property + def buffer(self: NoOutput) -> BinaryIO: + """Buffer: Needed but does nothing.""" + return self.buffer + + @property + def encoding(self: NoOutput) -> str: + """Encoding: Needed but does nothing.""" + return "" + + @property + def errors(self: NoOutput) -> None: + """Errors: Needed but does nothing.""" + + @property + def line_buffering(self: NoOutput) -> int: + """Line_buffering: Needed but does nothing.""" + return 0 + + @property + def newlines(self: NoOutput) -> None: + """Newlines: Needed but does nothing.""" + class LinuxTimeCM: """