util: fix the signature for the pypy override of sortdict.update()
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 25 Mar 2021 20:22:00 -0400
changeset 46900 64400d05db1e
parent 46899 8b6e36e4b553
child 46901 51841b23670b
util: fix the signature for the pypy override of sortdict.update() PyCharm flagged this as not matching the base class signature. Not sure if there was anything supplying these extra arguments though. Differential Revision: https://phab.mercurial-scm.org/D10275
mercurial/util.py
--- a/mercurial/util.py	Thu Mar 25 18:59:14 2021 -0400
+++ b/mercurial/util.py	Thu Mar 25 20:22:00 2021 -0400
@@ -1296,11 +1296,13 @@
 
     if pycompat.ispypy:
         # __setitem__() isn't called as of PyPy 5.8.0
-        def update(self, src):
+        def update(self, src, **f):
             if isinstance(src, dict):
                 src = pycompat.iteritems(src)
             for k, v in src:
                 self[k] = v
+            for k in f:
+                self[k] = f[k]
 
     def insert(self, position, key, value):
         for (i, (k, v)) in enumerate(list(self.items())):