INNER CODE UNIT · Python

load_config

antoniorodr/cronboard · src/cronboard/app.py:133

    def load_config(self) -> dict:
        """Loads the config file.

        Returns:
            The config as a dictionary.
        """

        if self.config_path.exists():
            try:
                with self.config_path.open("rb") as f:
                    return tomllib.load(f)
            except Exception as e:
                print(f"Warning: Failed to load config: {e}")
        return {}

    def watch_theme(self, theme: str) -> None:
        """Watches the theme and saves it to the config file.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…