( )⚙ D11472 archival: force a `CompressionError` to bytes before passing to `error.Abort`

This is an archive of the discontinued Mercurial Phabricator instance.

archival: force a `CompressionError` to bytes before passing to `error.Abort`
ClosedPublic

Authored by mharbison72 on Sep 21 2021, 11:38 AM.

Details

Summary

I'm not sure what changed before pytype 09-09-2021 (from 04-15-2021), but this
started getting flagged.

This fixes:

File "/mnt/c/Users/Matt/hg/mercurial/archival.py", line 199, in taropen: Function bytestr.__init__ was called with the wrong arguments [wrong-arg-types]
         Expected: (self, ints: Iterable[int])
  Actually passed: (self, ints: tarfile.CompressionError)
  Attributes of protocol Iterable[int] are not implemented on tarfile.CompressionError: __iter__

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage