Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_null_file.py70 linesDownload Raw Back to rich
1from types import TracebackType2from typing import IO, Iterable, Iterator, List, Optional, Type3 4 5class NullFile(IO[str]):6    def close(self) -> None:7        pass8 9    def isatty(self) -> bool:10        return False11 12    def read(self, __n: int = 1) -> str:13        return ""14 15    def readable(self) -> bool:16        return False17 18    def readline(self, __limit: int = 1) -> str:19        return ""20 21    def readlines(self, __hint: int = 1) -> List[str]:22        return []23 24    def seek(self, __offset: int, __whence: int = 1) -> int:25        return 026 27    def seekable(self) -> bool:28        return False29 30    def tell(self) -> int:31        return 032 33    def truncate(self, __size: Optional[int] = 1) -> int:34        return 035 36    def writable(self) -> bool:37        return False38 39    def writelines(self, __lines: Iterable[str]) -> None:40        pass41 42    def __next__(self) -> str:43        return ""44 45    def __iter__(self) -> Iterator[str]:46        return iter([""])47 48    def __enter__(self) -> IO[str]:49        return self50 51    def __exit__(52        self,53        __t: Optional[Type[BaseException]],54        __value: Optional[BaseException],55        __traceback: Optional[TracebackType],56    ) -> None:57        pass58 59    def write(self, text: str) -> int:60        return 061 62    def flush(self) -> None:63        pass64 65    def fileno(self) -> int:66        return -167 68 69NULL_FILE = NullFile()70 
codekingpro/portable-devtools · Team Ai