Skip to content

Commit d213d3d

Browse files
Copilotnsmith-
andauthored
Fix mypy lint errors from v1.18.2 upgrade (#88)
* Initial plan * Fix mypy lint errors by removing unused type: ignore comments Co-authored-by: nsmith- <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: nsmith- <[email protected]>
1 parent 59d7e2b commit d213d3d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/fsspec_xrootd/xrootd.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ async def _touch(self, path: str, truncate: bool = False, **kwargs: Any) -> None
392392
touch = sync_wrapper(_touch)
393393

394394
async def _modified(self, path: str) -> Any:
395-
status, statInfo = await _async_wrap(self._myclient.stat)(path, self.timeout) # type: ignore[var-annotated]
395+
status, statInfo = await _async_wrap(self._myclient.stat)(path, self.timeout)
396396
return statInfo.modtime
397397

398398
modified = sync_wrapper(_modified)
@@ -449,13 +449,13 @@ async def _ls(self, path: str, detail: bool = True, **kwargs: Any) -> list[Any]:
449449
if path in self.dircache and not kwargs.get("force_update", False):
450450
if detail:
451451
listing = self._ls_from_cache(path)
452-
return listing
452+
return cast(list[Any], listing)
453453
else:
454454
return [
455455
os.path.basename(item["name"]) for item in self._ls_from_cache(path)
456456
]
457457
else:
458-
status, deets = await _async_wrap(self._myclient.dirlist)( # type: ignore[var-annotated]
458+
status, deets = await _async_wrap(self._myclient.dirlist)(
459459
path, DirListFlags.STAT, self.timeout
460460
)
461461
if not status.ok:
@@ -504,7 +504,7 @@ async def _cat_file(
504504
if start is not None and end is not None:
505505
n_bytes = end - start
506506

507-
status, data = await _async_wrap(_myFile.read)( # type: ignore[var-annotated]
507+
status, data = await _async_wrap(_myFile.read)(
508508
start or 0,
509509
n_bytes or 0,
510510
self.timeout,
@@ -526,7 +526,7 @@ async def _get_file(
526526
start: int = 0
527527
while True:
528528
# Read a chunk of content from the remote file
529-
status, chunk = await _async_wrap(remote_file.read)( # type: ignore[var-annotated]
529+
status, chunk = await _async_wrap(remote_file.read)(
530530
start, chunk_size, self.timeout
531531
)
532532
start += chunk_size
@@ -562,7 +562,7 @@ async def _get_max_chunk_info(cls, file: Any) -> tuple[int, int]:
562562
data_server = f"{data_server.protocol}://{data_server.hostid}/"
563563
if data_server not in cls._dataserver_info_cache:
564564
fs = client.FileSystem(data_server)
565-
status, result = await _async_wrap(fs.query)( # type: ignore[var-annotated]
565+
status, result = await _async_wrap(fs.query)(
566566
QueryCode.CONFIG, "readv_iov_max readv_ior_max"
567567
)
568568
if not status.ok:
@@ -609,7 +609,7 @@ async def _cat_vector_read(
609609
max_num_chunks, max_chunk_size = await self._get_max_chunk_info(_myFile)
610610
vectors = _chunks_to_vectors(chunks, max_num_chunks, max_chunk_size)
611611

612-
coros = [_async_wrap(_myFile.vector_read)(v, self.timeout) for v in vectors] # type: ignore[var-annotated]
612+
coros = [_async_wrap(_myFile.vector_read)(v, self.timeout) for v in vectors]
613613

614614
results = await _run_coros_in_chunks(coros, batch_size=batch_size, nofiles=True)
615615
result_bufs = []

0 commit comments

Comments
 (0)