changeset 43906:727cf6acadfe

patch: make __repr__() return str 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]) Differential Revision: https://phab.mercurial-scm.org/D7682
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 16 Dec 2019 23:27:17 -0500
parents 4d59cc8bda65
children 68af0228fedc
files mercurial/patch.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Sun Dec 15 23:46:10 2019 -0500
+++ b/mercurial/patch.py	Mon Dec 16 23:27:17 2019 -0500
@@ -963,7 +963,7 @@
         return self.files()[-1]
 
     def __repr__(self):
-        return b'<header %s>' % (b' '.join(map(repr, self.files())))
+        return '<header %s>' % (' '.join(map(repr, self.files())))
 
     def isnewfile(self):
         return any(self.newfile_re.match(h) for h in self.header)