D10275: util: fix the signature for the pypy override of sortdict.update()
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Fri Mar 26 04:40:09 UTC 2021
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
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())):
To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list