From b1a28244e4ef4f6f1c9178b8514c0516bb2c5123 Mon Sep 17 00:00:00 2001 From: Hidy Han Date: Sun, 24 Sep 2023 13:50:31 -0700 Subject: [PATCH] Removes stale annotator exception. --- codalab/worker/tar_subdir_stream.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/codalab/worker/tar_subdir_stream.py b/codalab/worker/tar_subdir_stream.py index d3a9feb3c..b15e53509 100644 --- a/codalab/worker/tar_subdir_stream.py +++ b/codalab/worker/tar_subdir_stream.py @@ -118,9 +118,7 @@ def _read_from_tar(self, num_bytes=None) -> None: assert self.output.fileobj is not None self.output.fileobj.write(chunk) self.current_desc.pos += len(chunk) - # We're ignoring types here because the TarFile.offset type is missing. - # TODO: Remove "# type: ignore" annotations once this PR is merged: https://github.com/python/typeshed/pull/5210 - self.output.offset += len(chunk) # type: ignore + self.output.offset += len(chunk) else: # We've finished reading the entire current descendant. # Write the remainder of the block, if needed, and then reset the descendant so it is empty. @@ -132,7 +130,7 @@ def _read_from_tar(self, num_bytes=None) -> None: assert self.output.fileobj is not None self.output.fileobj.write(tarfile.NUL * (tarfile.BLOCKSIZE - remainder)) blocks += 1 - self.output.offset += blocks * tarfile.BLOCKSIZE # type: ignore + self.output.offset += blocks * tarfile.BLOCKSIZE self.current_desc = CurrentDescendant( desc=None, pos=0, finfo=EmptyFileInfo, tinfo=tarfile.TarInfo(), )