Skip to content

Commit 06bf183

Browse files
committed
add type annotations
1 parent fc93c50 commit 06bf183

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/fsspec_xrootd/xrootd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ def close(self) -> None:
951951
raise OSError(f"File did not close properly: {status.message}")
952952
self.closed = True
953953

954-
def seek(self, loc, whence=0):
954+
def seek(self, loc: int, whence: int = 0) -> int:
955955
"""Set current file location
956956
957957
Parameters
@@ -975,11 +975,11 @@ def seek(self, loc, whence=0):
975975
self.loc = nloc
976976
return self.loc
977977

978-
def writable(self):
978+
def writable(self) -> bool:
979979
"""Whether opened for writing"""
980980
return self.mode in {"wb", "ab", "xb", "r+b"} and not self.closed
981981

982-
def write(self, data):
982+
def write(self, data: bytes) -> int:
983983
"""
984984
Write data to buffer.
985985
@@ -1009,7 +1009,7 @@ def write(self, data):
10091009
raise OSError(f"File did not write properly: {status.message}")
10101010
return len(data)
10111011

1012-
def read(self, length=-1):
1012+
def read(self, length: int = -1) -> bytes:
10131013
"""
10141014
Return data from cache, or fetch pieces as necessary
10151015

0 commit comments

Comments
 (0)