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.

Fix progress_bar.__iter__ type hint to return Iterator instead of Iterable (#6292)

Copilot10411d0c44ec
diff --git a/marimo/_plugins/stateless/status/_progress.py b/marimo/_plugins/stateless/status/_progress.py
index 7d4a367f7d..7bc6d293a2 100644
--- a/marimo/_plugins/stateless/status/_progress.py
+++ b/marimo/_plugins/stateless/status/_progress.py
@@ -19,7 +19,7 @@ from marimo._plugins.core.web_component import build_stateless_plugin
from marimo._utils.debounce import debounce
if TYPE_CHECKING:
- from collections.abc import Collection, Iterable
+ from collections.abc import Collection, Iterator
S = TypeVar("S")
T = TypeVar("T")
@@ -359,7 +359,7 @@ class progress_bar:
if not disabled:
output.append(self.progress)
- def __iter__(self) -> Iterable[S | int]:
+ def __iter__(self) -> Iterator[S | int]:
for item in self.collection:
yield item # type: ignore[misc]
if not self.disabled: