This is an archive of the discontinued Mercurial Phabricator instance.

patch: make __repr__() return str
ClosedPublic

Authored by mharbison72 on Dec 16 2019, 11:46 PM.

Details

Summary

Caught by pytype:

line 969, in __repr__: Function bytes.join was called with the wrong arguments [wrong-arg-types]
Expected: (self, iterable: Iterable[bytes])
Actually passed: (self, iterable: Iterator[str])

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

mharbison72 created this revision.Dec 16 2019, 11:46 PM
pulkit accepted this revision.Dec 17 2019, 3:08 AM
This revision is now accepted and ready to land.Dec 17 2019, 3:08 AM
dlax accepted this revision.Dec 17 2019, 3:26 AM
dlax added a subscriber: dlax.
dlax added inline comments.
mercurial/patch.py
966

Somehow unrelated, but self.files() returns a list of bytes I think. So this will lead to something like "<header b'file' b'file'>". But maybe this is okay? (at least it wouldn't crash now)

This revision was automatically updated to reflect the committed changes.