Skip to content

Commit 9d69a27

Browse files
committed
Make various reactive-oriented methods internals
1 parent aa8fc8a commit 9d69a27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/textual/widgets/_progress_bar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,23 +362,23 @@ def updater(percentage: float | None) -> None:
362362
self.watch(self, "percentage", update_percentage(eta_status))
363363
yield eta_status
364364

365-
def validate_progress(self, progress: float) -> float:
365+
def _validate_progress(self, progress: float) -> float:
366366
"""Clamp the progress between 0 and the maximum total."""
367367
if self.total is not None:
368368
return clamp(progress, 0, self.total)
369369
return progress
370370

371-
def validate_total(self, total: float | None) -> float | None:
371+
def _validate_total(self, total: float | None) -> float | None:
372372
"""Ensure the total is not negative."""
373373
if total is None:
374374
return total
375375
return max(0, total)
376376

377-
def watch_total(self, total: float | None) -> None:
377+
def _watch_total(self) -> None:
378378
"""Re-validate progress."""
379379
self.progress = self.progress
380380

381-
def compute_percentage(self) -> float | None:
381+
def _compute_percentage(self) -> float | None:
382382
"""Keep the percentage of progress updated automatically.
383383
384384
This will report a percentage of `1` if the total is zero.

0 commit comments

Comments
 (0)