fix: callback must be called after parent call
This commit is contained in:
@@ -34,11 +34,7 @@ class CustomProgress(Progress):
|
|||||||
refresh: bool = False,
|
refresh: bool = False,
|
||||||
**fields: Any,
|
**fields: Any,
|
||||||
) -> None:
|
) -> None:
|
||||||
if self._ft_callback:
|
t = super().update(
|
||||||
self._ft_callback(
|
|
||||||
self.tasks[task_id],
|
|
||||||
)
|
|
||||||
return super().update(
|
|
||||||
task_id,
|
task_id,
|
||||||
total=total,
|
total=total,
|
||||||
completed=completed,
|
completed=completed,
|
||||||
@@ -48,6 +44,11 @@ class CustomProgress(Progress):
|
|||||||
refresh=refresh,
|
refresh=refresh,
|
||||||
**fields,
|
**fields,
|
||||||
)
|
)
|
||||||
|
if self._ft_callback:
|
||||||
|
self._ft_callback(
|
||||||
|
self.tasks[task_id],
|
||||||
|
)
|
||||||
|
return t
|
||||||
|
|
||||||
def get_renderable(self) -> ConsoleRenderable | RichCast | str:
|
def get_renderable(self) -> ConsoleRenderable | RichCast | str:
|
||||||
objs = [obj for obj in self._cust_objs]
|
objs = [obj for obj in self._cust_objs]
|
||||||
|
|||||||
Reference in New Issue
Block a user