python3: replace sorted(<dict>.iterkeys()) with sorted(<dict>)

This commit is contained in:
Augie Fackler 2017-08-22 20:06:58 -04:00
parent e2774d9258
commit 48dbe73629
3 changed files with 3 additions and 3 deletions

View File

@ -479,7 +479,7 @@ def synthesize(ui, repo, descpath, **opts):
date = min(0x7fffffff, max(0, date))
user = random.choice(words) + '@' + random.choice(words)
mc = context.memctx(repo, pl, makeline(minimum=2),
sorted(changes.iterkeys()),
sorted(changes),
filectxfn, user, '%d %d' % (date, pick(tzoffset)))
newnode = mc.commit()
heads.add(repo.changelog.rev(newnode))

View File

@ -31,7 +31,7 @@ def parsemeta(text):
return meta, (s + 2)
def packmeta(meta, text):
keys = sorted(meta.iterkeys())
keys = sorted(meta)
metatext = "".join("%s: %s\n" % (k, meta[k]) for k in keys)
return "\1\n%s\1\n%s" % (metatext, text)

View File

@ -25,7 +25,7 @@ def writeauth(items):
def dumpdict(dict):
return '{' + ', '.join(['%s: %s' % (k, dict[k])
for k in sorted(dict.iterkeys())]) + '}'
for k in sorted(dict)]) + '}'
def test(auth, urls=None):
print('CFG:', dumpdict(auth))