(
        self, path: PATH_TYPES, text: bool = True
    )
Yield a file context to iterate over. If text is false, open the file with
        'rb' mode specified.
Yield a file context to iterate over. If text is false, open the file with
        'rb' mode specified.
Yield a file context to iterate over . If text is false open the file with rb mode specified .
def open_file(
        self, path: PATH_TYPES, text: bool = True
    ) -> Generator[IO, None, None]:
        """Yield a file context to iterate over. If text is false, open the file with
        'rb' mode specified."""
        wrapper = io.StringIO if text else io.BytesIO
        content: IO = wrapper(self.read_file(path, text=text))
        yield content
def open_file ( self , path : PATH_TYPES , text : bool = True ) -> Generator [ IO , None , None ] : wrapper = io . StringIO if text else io . BytesIO content : IO = wrapper ( self . read_file ( path , text = text ) ) yield content