pass
@abstractmethod
- def readlines(self, hint: int = -1) -> List[AnyStr]:
+ def readlines(self, hint: int = -1) -> list[AnyStr]:
pass
@abstractmethod
pass
@abstractmethod
- def truncate(self, size: int = None) -> int:
+ def truncate(self, size: int | None = None) -> int:
pass
@abstractmethod
pass
@abstractmethod
- def writelines(self, lines: List[AnyStr]) -> None:
+ def writelines(self, lines: list[AnyStr]) -> None:
pass
@abstractmethod
- def __enter__(self) -> 'IO[AnyStr]':
+ def __enter__(self) -> IO[AnyStr]:
pass
@abstractmethod
__slots__ = ()
@abstractmethod
- def write(self, s: Union[bytes, bytearray]) -> int:
+ def write(self, s: bytes | bytearray) -> int:
pass
@abstractmethod
- def __enter__(self) -> 'BinaryIO':
+ def __enter__(self) -> BinaryIO:
pass
@property
@abstractmethod
- def errors(self) -> Optional[str]:
+ def errors(self) -> str | None:
pass
@property
pass
@abstractmethod
- def __enter__(self) -> 'TextIO':
+ def __enter__(self) -> TextIO:
pass