Format: application/octet-stream
⬇ Download File (716 B)
   1  from typing import IO, List, Optional, Tuple, Union
   2  
   3  class TextFile:
   4      def __init__(
   5          self,
   6          filename: Optional[str] = ...,
   7          file: Optional[IO[str]] = ...,
   8          *,
   9          strip_comments: bool = ...,
  10          lstrip_ws: bool = ...,
  11          rstrip_ws: bool = ...,
  12          skip_blanks: bool = ...,
  13          join_lines: bool = ...,
  14          collapse_join: bool = ...,
  15      ) -> None: ...
  16      def open(self, filename: str) -> None: ...
  17      def close(self) -> None: ...
  18      def warn(self, msg: str, line: Union[List[int], Tuple[int, int], int] = ...) -> None: ...
  19      def readline(self) -> Optional[str]: ...
  20      def readlines(self) -> List[str]: ...
  21      def unreadline(self, line: str) -> str: ...
  22