feat: draft better debug
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
e93f6d754c
commit
4510520db6
@ -82,10 +82,11 @@ class Collection(Generic[T]):
|
||||
self._map_element(e)
|
||||
|
||||
def _find_object(self, __object: T, no_push_to: bool = False) -> Optional[T]:
|
||||
if not no_push_to:
|
||||
if not no_push_to or True:
|
||||
for c in self.push_to:
|
||||
found, found_in = c._find_object(__object, no_push_to=True)
|
||||
if found is not None:
|
||||
output("push to", found, __object, color=BColors.RED)
|
||||
return found, found_in
|
||||
|
||||
self._remap()
|
||||
@ -114,10 +115,10 @@ class Collection(Generic[T]):
|
||||
|
||||
if map_to is self:
|
||||
for other, contained in (c._find_object(__object, no_push_to=True) for c in self.pull_from):
|
||||
output(other, __object, contained, color=BColors.RED)
|
||||
if other is None:
|
||||
continue
|
||||
|
||||
output("pull from", other, __object, color=BColors.RED)
|
||||
__object.__merge__(other, no_push_to=False, **kwargs)
|
||||
contained.remove(other)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user