Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Add destructor/constructor calls to Progress (#334)

Akshay Agrawala5c7cce70477
diff --git a/marimo/_plugins/stateless/status/_progress.py b/marimo/_plugins/stateless/status/_progress.py
index 068871cce9..49f74780e9 100644
--- a/marimo/_plugins/stateless/status/_progress.py
+++ b/marimo/_plugins/stateless/status/_progress.py
@@ -34,7 +34,10 @@ class _Progress(Html):
self.closed = False
# We show a loading spinner if total not known
self.loading_spinner = total is None
- self._text = self._get_text()
+ super().__init__(self._get_text())
+
+ def __del__(self) -> None:
+ super().__del__()
def update_progress(
self,