comparison mercurial/hgweb/webcommands.py @ 51762:ca7bde5dbafb

black: format the codebase with 23.3.0 The CI has moved to 23.3.0, which is the last version that supports 3.7 at runtime, so we should honor this change. # skip-blame mass-reformating only
author Rapha?l Gom?s <rgomes@octobus.net>
date Thu, 18 Jul 2024 12:36:12 +0200
parents 7f0cb9ee0534
children 454feddab720
comparison
equal deleted inserted replaced
51761:b0a4de6c14f8 51762:ca7bde5dbafb
599 b"permissions": mf.flags(full), 599 b"permissions": mf.flags(full),
600 } 600 }
601 601
602 def dirlist(context): 602 def dirlist(context):
603 for d in sorted(dirs): 603 for d in sorted(dirs):
604
605 emptydirs = [] 604 emptydirs = []
606 h = dirs[d] 605 h = dirs[d]
607 while isinstance(h, dict) and len(h) == 1: 606 while isinstance(h, dict) and len(h) == 1:
608 k, v = next(iter(h.items())) 607 k, v = next(iter(h.items()))
609 if v: 608 if v:
1425 if item[1] == graphmod.CHANGESET 1424 if item[1] == graphmod.CHANGESET
1426 ) 1425 )
1427 return tree 1426 return tree
1428 1427
1429 def jsdata(context): 1428 def jsdata(context):
1430 for (id, type, ctx, vtx, edges) in fulltree(): 1429 for id, type, ctx, vtx, edges in fulltree():
1431 yield { 1430 yield {
1432 b'node': pycompat.bytestr(ctx), 1431 b'node': pycompat.bytestr(ctx),
1433 b'graphnode': webutil.getgraphnode(web.repo, ctx), 1432 b'graphnode': webutil.getgraphnode(web.repo, ctx),
1434 b'vertex': vtx, 1433 b'vertex': vtx,
1435 b'edges': edges, 1434 b'edges': edges,