INNER CODE UNIT · Python

action_reload

idoavrah/terraform-tui · src/tftui/app.py:188

    def action_reload(self) -> None:
        self.notify("Refreshing state")
        self.reload_state()

    @work(exclusive=True, group="state")
    async def reload_state(self) -> None:
        await self._load_state()

    async def _load_state(self, *, show_tree: bool = True) -> None:
        """Reload the state into the tree.

        ``show_tree`` is false after an apply: the state has changed and the
        tree must be rebuilt, but the user is still reading the apply output
        and should not be thrown back to the tree mid-sentence.
        """
        tree = self.state_tree
        tree.loading = True
        self.search_input.value = ""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…