Skip to content

Commit

Permalink
Workaround for mypy warning
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Sep 20, 2020
1 parent 0af0fb0 commit e8ac4c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py7zr/archiveinfo.py
Expand Up @@ -938,7 +938,7 @@ def _encode_header(self, file: BinaryIO, afterheader: int, filters):
# actual header start position
startpos = file.tell()
crcfile = WriteWithCrc(file)
headerstreams.write(crcfile)
headerstreams.write(crcfile) # type: ignore # noqa
digest = crcfile.digest
return startpos, digest

Expand All @@ -952,12 +952,12 @@ def write(self, file: BinaryIO, afterheader: int, encoded=True, encrypted=False)
startpos, headercrc = self._encode_header(file, afterheader, filters)
else:
crcfile = WriteWithCrc(file)
write_byte(crcfile, Property.HEADER)
write_byte(crcfile, Property.HEADER) # type: ignore # noqa
if self.main_streams is not None:
self.main_streams.write(crcfile)
if self.files_info is not None:
self.files_info.write(crcfile)
write_byte(crcfile, Property.END)
write_byte(crcfile, Property.END) # type: ignore
headercrc = crcfile.digest
endpos = file.tell()
header_len = endpos - startpos
Expand Down

0 comments on commit e8ac4c4

Please sign in to comment.