Skip to content

Commit

Permalink
Improved Group plugin initialization for mike (#6534)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkrzyskow committed Dec 18, 2023
1 parent 6e0b497 commit 55fe1cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions material/plugins/group/plugin.py
Expand Up @@ -38,6 +38,14 @@
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"
Expand Down
8 changes: 8 additions & 0 deletions src/plugins/group/plugin.py
Expand Up @@ -38,6 +38,14 @@
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"
Expand Down

0 comments on commit 55fe1cc

Please sign in to comment.