mirror of
https://github.com/neondatabase/neon.git
synced 2026-07-07 14:10:43 +00:00
format
This commit is contained in:
@@ -146,7 +146,7 @@ class NeonBranch:
|
||||
Prints the branch's id with all the predecessors
|
||||
(r) means the branch is a reset one
|
||||
"""
|
||||
return f"{self.id}{f'({self.name})' if self.name and self.name != self.id else ''}, {f"restored_from: {self.restored_from}" if self.restored_from else ''} parent: {self.parent}"
|
||||
return f"{self.id}{f'({self.name})' if self.name and self.name != self.id else ''}, {f'restored_from: {self.restored_from}' if self.restored_from else ''} parent: {self.parent}"
|
||||
|
||||
def random_time(self) -> datetime:
|
||||
min_time = max(
|
||||
@@ -354,7 +354,11 @@ 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.id != self.main_branch.id
|
||||
and parent.parent is not None
|
||||
):
|
||||
self.leaf_branches[parent.id] = parent
|
||||
parent.children.pop(branch_id)
|
||||
if branch_id in self.leaf_branches:
|
||||
|
||||
Reference in New Issue
Block a user