Skip to content

Commit a03b0ce

Browse files
authored
Apply suggestions from code review
Co-authored-by: NTFSvolume <172021377+NTFSvolume@users.noreply.github.com>
1 parent 49a031f commit a03b0ce

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/mega/filesystem.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def fields():
9292
yield "files", self.file_count
9393
yield "folders", self.file_count
9494

95-
all_fields = "".join(f"{name}={value!r}" for name, value in fields())
95+
all_fields = ", ".join(f"{name}={value!r}" for name, value in fields())
9696
return f"<{type(self).__name__}({all_fields})>"
9797

9898
def __len__(self) -> int:
@@ -123,8 +123,8 @@ def build(cls, nodes: Iterable[Node]) -> Self:
123123
children: dict[NodeID, list[NodeID]] = {}
124124

125125
def sanity_check(current: Node | None, found: Node) -> None:
126-
if root is not None:
127-
ids = root.id, found.id
126+
if current is not None:
127+
ids = current.id, found.id
128128
raise ValidationError(f"Multiple nodes of type {found.type.name} found: {ids}")
129129

130130
for node in nodes:

0 commit comments

Comments
 (0)