Skip to content

Commit f9695cb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 637a4f3 commit f9695cb

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/fsspec_xrootd/xrootd.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,7 @@ async def _rm_file(self, path: str, **kwargs: Any) -> None:
374374
async def _touch(self, path: str, truncate: bool = False, **kwargs: Any) -> None:
375375
if truncate or not await self._exists(path):
376376
f = client.File()
377-
status, _ = await _async_wrap(f.open)(
378-
path, OpenFlags.DELETE
379-
)
377+
status, _ = await _async_wrap(f.open)(path, OpenFlags.DELETE)
380378
await _async_wrap(f.close)()
381379
if not status.ok:
382380
raise OSError(f"File not touched properly: {status.message}")
@@ -999,12 +997,7 @@ def write(self, data: bytes) -> int:
999997
raise ValueError("I/O operation on closed file.")
1000998
if self.forced:
1001999
raise ValueError("This file has been force-flushed, can only close")
1002-
status, _n = self._myFile.write(
1003-
data,
1004-
self.loc,
1005-
len(data),
1006-
timeout=self.timeout
1007-
)
1000+
status, _n = self._myFile.write(data, self.loc, len(data), timeout=self.timeout)
10081001
self.loc += len(data)
10091002
self.size = max(self.size, self.loc)
10101003
if not status.ok:
@@ -1034,4 +1027,4 @@ def read(self, length: int = -1) -> bytes:
10341027
out = cast(bytes, self.cache._fetch(self.loc, self.loc + length))
10351028

10361029
self.loc += len(out)
1037-
return out
1030+
return out

0 commit comments

Comments
 (0)