simplemerge: disable a pytype error where it's just confused
authorAugie Fackler <augie@google.com>
Wed, 06 Nov 2019 15:42:30 -0500
changeset 43486 3b581ad59459
parent 43485 6ff196d2553b
child 43487 d5bef33ab83c
simplemerge: disable a pytype error where it's just confused Differential Revision: https://phab.mercurial-scm.org/D7287
mercurial/simplemerge.py
--- a/mercurial/simplemerge.py	Wed Nov 06 15:42:12 2019 -0500
+++ b/mercurial/simplemerge.py	Wed Nov 06 15:42:30 2019 -0500
@@ -291,7 +291,19 @@
             if region[0] != b"conflict":
                 yield region
                 continue
-            issue, z1, z2, a1, a2, b1, b2 = region
+            # pytype thinks this tuple contains only 3 things, but
+            # that's clearly not true because this code successfully
+            # executes. It might be wise to rework merge_regions to be
+            # some kind of attrs type.
+            (
+                issue,
+                z1,
+                z2,
+                a1,
+                a2,
+                b1,
+                b2,
+            ) = region  # pytype: disable=bad-unpacking
             alen = a2 - a1
             blen = b2 - b1