( )⚙ D10174 debug: convert a few exceptions to bytes before wrapping in another error

This is an archive of the discontinued Mercurial Phabricator instance.

debug: convert a few exceptions to bytes before wrapping in another error
ClosedPublic

Authored by mharbison72 on Mar 12 2021, 1:08 PM.

Details

Summary

Caught by pytype:

File "/mnt/c/Users/Matt/hg/mercurial/debugcommands.py", line 2118, in debugmanifestfulltextcache: Function Abort.__init__ was called with the wrong arguments [wrong-arg-types]
         Expected: (self, message: Union[bytearray, bytes, memoryview], ...)
  Actually passed: (self, message: mercurial.error.LookupError, ...)
File "/mnt/c/Users/Matt/hg/mercurial/debugcommands.py", line 2453, in debugobsolete: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types]
         Expected: (self, ints: Iterable[int])
  Actually passed: (self, ints: ValueError)
  The following methods aren't implemented on ValueError:
  __iter__

Diff Detail

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