Repository: Lightning-AI/pytorch-lightning
File: pytorch_lightning/callbacks/progress/rich_progress.py (Python)

Code before:

    .. code-block:: python

        from pytorch_lightning import Trainer
        from pytorch_lightning.callbacks import RichProgressBar

        trainer = Trainer(callbacks=RichProgressBar())

    Args:
        refresh_rate_per_second: the number of updates per second. If refresh_rate is 0, progress bar is disabled.
        theme: Contains styles used to stylize the progress bar.

    Raises:
        ImportError:
            If required `rich` package is not installed on the device.
    """

    def __init__(
        self,
        refresh_rate_per_second: int = 10,
        theme: RichProgressBarTheme = RichProgressBarTheme(),
    ) -> None:
        if not _RICH_AVAILABLE:
            raise ImportError(
                "`RichModelSummary` requires `rich>=10.2.2` to be installed. "
                "Install it by running `pip install rich` or upgrade by running `pip install rich -U."
            )
        super().__init__()
        self._refresh_rate_per_second: int = refresh_rate_per_second
        self._enabled: bool = True
        self.progress: Optional[Progress] = None
        self.val_sanity_progress_bar_id: Optional[int] = None
        self._reset_progress_bar_ids()
        self._progress_stopped: bool = False
        self.theme = theme
        self._console: Console = Console()

    @property
    def refresh_rate_per_second(self) -> float:
        """Refresh rate for Rich Progress.

        Returns: Refresh rate for Progress Bar.
            Return 1 if not enabled, as a positive integer is required (ignored by Rich Progress).
        """
        return self._refresh_rate_per_second if self._refresh_rate_per_second > 0 else 1

    @property
    def is_enabled(self) -> bool:
        return self._enabled and self._refresh_rate_per_second > 0

    @property

Review comment (suggestion):
I would prefer that we don't mention the specific version here as it is very likely this becomes outdated

```suggestion
                "`RichProgressBar` requires `rich` to be installed. Install it by running `pip install -U rich`."
```

Same in the change below

Code after:

    .. code-block:: python

        from pytorch_lightning import Trainer
        from pytorch_lightning.callbacks import RichProgressBar

        trainer = Trainer(callbacks=RichProgressBar())

    Args:
        refresh_rate_per_second: the number of updates per second. If refresh_rate is 0, progress bar is disabled.
        theme: Contains styles used to stylize the progress bar.

    Raises:
        ImportError:
            If required `rich` package is not installed on the device.
    """

    def __init__(
        self,
        refresh_rate_per_second: int = 10,
        theme: RichProgressBarTheme = RichProgressBarTheme(),
    ) -> None:
        if not _RICH_AVAILABLE:
            raise ImportError(
                "`RichProgressBar` requires `rich` to be installed. Install it by running `pip install -U rich`."
            )
        super().__init__()
        self._refresh_rate_per_second: int = refresh_rate_per_second
        self._enabled: bool = True
        self.progress: Optional[Progress] = None
        self.val_sanity_progress_bar_id: Optional[int] = None
        self._reset_progress_bar_ids()
        self._progress_stopped: bool = False
        self.theme = theme
        self._console: Console = Console()

    @property
    def refresh_rate_per_second(self) -> float:
        """Refresh rate for Rich Progress.

        Returns: Refresh rate for Progress Bar.
            Return 1 if not enabled, as a positive integer is required (ignored by Rich Progress).
        """
        return self._refresh_rate_per_second if self._refresh_rate_per_second > 0 else 1

    @property
    def is_enabled(self) -> bool:
        return self._enabled and self._refresh_rate_per_second > 0

    @property
    def is_disabled(self) -> bool: