feat: renamed
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
Hazel 2024-06-10 13:46:40 +02:00
parent b30824baf9
commit 684c90a7b4

View File

@ -177,7 +177,7 @@ class Node(Generator[P]):
):
self.value = value
self.depth = 0
self.same_level_index: int = 0
self.index: int = 0
self.children: List[Node[P]] = kwargs.get("children", [])
@ -196,7 +196,7 @@ class Node(Generator[P]):
def __iter__(self, **kwargs) -> Generator[Node[P], None, None]:
_level_index_map: Dict[int, int] = kwargs.get("level_index_map", defaultdict(lambda: 0))
self.same_level_index = _level_index_map[self.depth]
self.index = _level_index_map[self.depth]
yield self
_level_index_map[self.depth] += 1