Skip to content

Commit ccd829f

Browse files
committed
Clean up a type warning on ProgressBar.compose.update_percentage
1 parent 9d69a27 commit ccd829f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/textual/widgets/_progress_bar.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,9 @@ def compose(self) -> ComposeResult:
340340
# We create a closure so that we can determine what are the sub-widgets
341341
# that are present and, therefore, will need to be notified about changes
342342
# to the percentage.
343-
def update_percentage(widget: Widget) -> Callable[[float | None], None]:
343+
def update_percentage(
344+
widget: Bar | PercentageStatus | ETAStatus,
345+
) -> Callable[[float | None], None]:
344346
"""Closure to allow updating the percentage of a given widget."""
345347

346348
def updater(percentage: float | None) -> None:

0 commit comments

Comments
 (0)