From 55fe1ccc539098b71f15795f1d6ab8297cb41142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Krzy=C5=9Bk=C3=B3w?= <34622465+kamilkrzyskow@users.noreply.github.com> Date: Mon, 18 Dec 2023 11:09:29 +0100 Subject: [PATCH] Improved Group plugin initialization for mike (#6534) --- material/plugins/group/plugin.py | 8 ++++++++ src/plugins/group/plugin.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/material/plugins/group/plugin.py b/material/plugins/group/plugin.py index e3f4df85d..b91fda96a 100644 --- a/material/plugins/group/plugin.py +++ b/material/plugins/group/plugin.py @@ -38,6 +38,14 @@ from .config import GroupConfig class GroupPlugin(BasePlugin[GroupConfig]): supports_multiple_instances = True + # Initialize plugin + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + # Initialize object attributes + self.is_serve = False + self.is_dirty = False + # Determine whether we're serving the site def on_startup(self, *, command, dirty): self.is_serve = command == "serve" diff --git a/src/plugins/group/plugin.py b/src/plugins/group/plugin.py index e3f4df85d..b91fda96a 100644 --- a/src/plugins/group/plugin.py +++ b/src/plugins/group/plugin.py @@ -38,6 +38,14 @@ from .config import GroupConfig class GroupPlugin(BasePlugin[GroupConfig]): supports_multiple_instances = True + # Initialize plugin + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + # Initialize object attributes + self.is_serve = False + self.is_dirty = False + # Determine whether we're serving the site def on_startup(self, *, command, dirty): self.is_serve = command == "serve"