[#8530] remove uses of tuple parameter unpacking
While sometimes convenient, the ability to unpack tuple parameters (to lambdas and functions) was removed from Python 3. Either use the tuple directly or unpack it in the function body. (lib2to3.fixes.fix_tuple_params)
This commit is contained in:
@@ -71,7 +71,7 @@ class AcquirerBuckaroo(models.Model):
|
||||
del values[key]
|
||||
break
|
||||
|
||||
items = sorted(values.items(), key=lambda (x, y): x.lower())
|
||||
items = sorted(values.items(), key=lambda pair: pair[0].lower())
|
||||
sign = ''.join('%s=%s' % (k, urllib.unquote_plus(v)) for k, v in items)
|
||||
else:
|
||||
sign = ''.join('%s=%s' % (k, get_value(k)) for k in keys)
|
||||
|
||||
@@ -780,7 +780,7 @@ class GroupsView(models.Model):
|
||||
others += g
|
||||
# build the result
|
||||
res = []
|
||||
for app, gs in sorted(by_app.iteritems(), key=lambda (a, _): a.sequence or 0):
|
||||
for app, gs in sorted(by_app.iteritems(), key=lambda it: it[0].sequence or 0):
|
||||
res.append(linearize(app, gs))
|
||||
if others:
|
||||
res.append((self.env['ir.module.category'], 'boolean', others))
|
||||
|
||||
Reference in New Issue
Block a user