comparison mercurial/revlogutils/nodemap.py @ 51699: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 f4733654f144
comparison
equal deleted inserted replaced
51698:b0a4de6c14f8 51699:ca7bde5dbafb
551 def _walk_trie(block): 551 def _walk_trie(block):
552 """yield all the block in a trie 552 """yield all the block in a trie
553 553
554 Children blocks are always yield before their parent block. 554 Children blocks are always yield before their parent block.
555 """ 555 """
556 for (__, item) in sorted(block.items()): 556 for __, item in sorted(block.items()):
557 if isinstance(item, dict): 557 if isinstance(item, dict):
558 for sub_block in _walk_trie(item): 558 for sub_block in _walk_trie(item):
559 yield sub_block 559 yield sub_block
560 yield block 560 yield block
561 561