comparison mercurial/util.py @ 46900:64400d05db1e

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
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 25 Mar 2021 20:22:00 -0400
parents 1ecf082386b7
children 51841b23670b
comparison
equal deleted inserted replaced
46899:8b6e36e4b553 46900:64400d05db1e
1294 del self[key] 1294 del self[key]
1295 super(sortdict, self).__setitem__(key, value) 1295 super(sortdict, self).__setitem__(key, value)
1296 1296
1297 if pycompat.ispypy: 1297 if pycompat.ispypy:
1298 # __setitem__() isn't called as of PyPy 5.8.0 1298 # __setitem__() isn't called as of PyPy 5.8.0
1299 def update(self, src): 1299 def update(self, src, **f):
1300 if isinstance(src, dict): 1300 if isinstance(src, dict):
1301 src = pycompat.iteritems(src) 1301 src = pycompat.iteritems(src)
1302 for k, v in src: 1302 for k, v in src:
1303 self[k] = v 1303 self[k] = v
1304 for k in f:
1305 self[k] = f[k]
1304 1306
1305 def insert(self, position, key, value): 1307 def insert(self, position, key, value):
1306 for (i, (k, v)) in enumerate(list(self.items())): 1308 for (i, (k, v)) in enumerate(list(self.items())):
1307 if i == position: 1309 if i == position:
1308 self[key] = value 1310 self[key] = value