Remove the redundant condition

This commit is contained in:
Alexey Masterov
2025-07-23 15:21:21 +02:00
parent 5e1057b860
commit 2ca2b05ab5

View File

@@ -351,11 +351,7 @@ class NeonProject:
if branch_id not in self.reset_branches:
self.terminate_benchmark(branch_id)
self.neon_api.delete_branch(self.id, branch_id)
if (
len(parent.children) == 1
and parent.id != self.main_branch.id
and parent.parent is not None
):
if len(parent.children) == 1 and parent.parent is not None:
self.leaf_branches[parent.id] = parent
parent.children.pop(branch_id)
if branch_id in self.leaf_branches: