INNER CODE UNIT · Python

_show

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

    def _show(self, view: str, title: str = "") -> None:
        self.switcher.current = view
        if view == TREE and not title:
            title = _selection_title(len(self.state_tree.selected))
        self.switcher.border_title = title

    # --------------------------------------------------------------- startup

    @work(exclusive=True, group="state")
    async def startup(self) -> None:
        """Initialise Terraform if asked to, then load the state."""
        if self.settings.run_init:
            self.state_tree.loading = True
            self.notify(f"Running {self.client.executable} init")
            result = await self.client.init(var_files=self.settings.var_files)
            if not result.ok:
                self.state_tree.loading = False
                self._fail(TftuiError(result.output))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…