changeset 51927:e99c007030da

git: make `dirstate.parents()` return a list like the core class The core class returned a list, so that's how I type annotated it, and this got flagged. I suppose we could annotate it as a `Sequence[bytes]`, but it's a trivial difference.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 27 Sep 2024 12:05:48 -0400
parents 70fe33bdab54
children 3688a984134b
files hgext/git/dirstate.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/git/dirstate.py	Fri Sep 27 11:57:42 2024 -0400
+++ b/hgext/git/dirstate.py	Fri Sep 27 12:05:48 2024 -0400
@@ -125,7 +125,7 @@
 
     def parents(self):
         # TODO how on earth do we find p2 if a merge is in flight?
-        return self.p1(), sha1nodeconstants.nullid
+        return [self.p1(), sha1nodeconstants.nullid]
 
     def __iter__(self):
         return (pycompat.fsencode(f.path) for f in self.git.index)