This is an archive of the discontinued Mercurial Phabricator instance.

branchmap: force Exception to bytes before logging
ClosedPublic

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

Details

Summary

Here was an instance where black mangled the formatting so that pytype
didn't recognize the suppression directive. But it seems that the error was
correct, and the code should follow other recent changes around exception
conversion.

File "/mnt/c/Users/Matt/hg/mercurial/branchmap.py", line 303, in fromfile: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types]
         Expected: (self, ints: Iterable[int])
  Actually passed: (self, ints: Exception)
  The following methods aren't implemented on Exception:
  __iter__

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Mar 12 2021, 1:08 PM
pulkit accepted this revision.Mar 12 2021, 1:15 PM
This revision is now accepted and ready to land.Mar 12 2021, 1:15 PM
This revision was automatically updated to reflect the committed changes.