Read one line or up to `size` bytes from the file. :param size: the maximum number of bytes to read
(self, size: int = -1)
| 1542 | return [x for x in self] # noqa: C416, RUF100 |
| 1543 | |
| 1544 | def readline(self, size: int = -1) -> bytes: |
| 1545 | """Read one line or up to `size` bytes from the file. |
| 1546 | |
| 1547 | :param size: the maximum number of bytes to read |
| 1548 | """ |
| 1549 | return self._read_size_or_line(size=size, line=True) |
| 1550 | |
| 1551 | def readlines(self, size: int = -1) -> list[bytes]: |
| 1552 | """Read one line or up to `size` bytes from the file. |