diff --git a/src/fsspec_xrootd/xrootd.py b/src/fsspec_xrootd/xrootd.py index 7a513c0..f0004bc 100644 --- a/src/fsspec_xrootd/xrootd.py +++ b/src/fsspec_xrootd/xrootd.py @@ -374,9 +374,7 @@ async def _rm_file(self, path: str, **kwargs: Any) -> None: async def _touch(self, path: str, truncate: bool = False, **kwargs: Any) -> None: if truncate or not await self._exists(path): f = client.File() - status, _ = await _async_wrap(f.open)( - path, OpenFlags.DELETE - ) + status, _ = await _async_wrap(f.open)(path, OpenFlags.DELETE) await _async_wrap(f.close)() if not status.ok: raise OSError(f"File not touched properly: {status.message}") @@ -997,12 +995,7 @@ def write(self, data: bytes) -> int: raise ValueError("I/O operation on closed file.") if self.forced: raise ValueError("This file has been force-flushed, can only close") - status, _n = self._myFile.write( - data, - self.loc, - len(data), - timeout=self.timeout - ) + status, _n = self._myFile.write(data, self.loc, len(data), timeout=self.timeout) self.loc += len(data) self.size = max(self.size, self.loc) if not status.ok: @@ -1032,4 +1025,4 @@ def read(self, length: int = -1) -> bytes: out = cast(bytes, self.cache._fetch(self.loc, self.loc + length)) self.loc += len(out) - return out \ No newline at end of file + return out