Skip to content

Commit 55fe1cc

Browse files
Improved Group plugin initialization for mike (#6534)
1 parent 6e0b497 commit 55fe1cc

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

material/plugins/group/plugin.py

+8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
class GroupPlugin(BasePlugin[GroupConfig]):
3939
supports_multiple_instances = True
4040

41+
# Initialize plugin
42+
def __init__(self, *args, **kwargs):
43+
super().__init__(*args, **kwargs)
44+
45+
# Initialize object attributes
46+
self.is_serve = False
47+
self.is_dirty = False
48+
4149
# Determine whether we're serving the site
4250
def on_startup(self, *, command, dirty):
4351
self.is_serve = command == "serve"

src/plugins/group/plugin.py

+8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
class GroupPlugin(BasePlugin[GroupConfig]):
3939
supports_multiple_instances = True
4040

41+
# Initialize plugin
42+
def __init__(self, *args, **kwargs):
43+
super().__init__(*args, **kwargs)
44+
45+
# Initialize object attributes
46+
self.is_serve = False
47+
self.is_dirty = False
48+
4149
# Determine whether we're serving the site
4250
def on_startup(self, *, command, dirty):
4351
self.is_serve = command == "serve"

0 commit comments

Comments
 (0)