Patchwork D10275: util: fix the signature for the pypy override of sortdict.update()

login
register
mail settings
Submitter phabricator
Date March 26, 2021, 4:40 a.m.
Message ID <differential-rev-PHID-DREV-xfss2q4rpkynyj4hoic7-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48590/
State Superseded
Headers show

Comments

phabricator - March 26, 2021, 4:40 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  PyCharm flagged this as not matching the base class signature.  Not sure if
  there was anything supplying these extra arguments though.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10275

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -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())):