Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 26, 2024
1 parent 9d6839f commit 7c09155
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
54 changes: 27 additions & 27 deletions src/aiidalab_qe/app/submission/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,30 +329,30 @@ def _update_state(self, _=None):
self.state = self.state.CONFIGURED

def _fetch_plugin_resource_settings(self):
for key in ("panel", "model"):
if key not in data:
raise ValueError(f"Entry {identifier} is missing the '{key}' key")
model: ResourceSettingsModel = resources["model"]()
model.observe(
self._on_plugin_submission_blockers_change,
["submission_blockers"],
)
model.observe(
self._on_plugin_submission_warning_messages_change,
["submission_warning_messages"],
)
self._model.add_model(identifier, model)

def toggle_plugin(_, model=model):
model.update()
self._update_tabs()

model.observe(
toggle_plugin,
"include",
)

self.settings[identifier] = panel(
identifier=identifier,
model=model,
)
for key in ("panel", "model"):
if key not in data:
raise ValueError(f"Entry {identifier} is missing the '{key}' key")
model: ResourceSettingsModel = resources["model"]()
model.observe(
self._on_plugin_submission_blockers_change,
["submission_blockers"],
)
model.observe(
self._on_plugin_submission_warning_messages_change,
["submission_warning_messages"],
)
self._model.add_model(identifier, model)

def toggle_plugin(_, model=model):
model.update()
self._update_tabs()

model.observe(
toggle_plugin,
"include",
)

self.settings[identifier] = panel(
identifier=identifier,
model=model,
)
1 change: 1 addition & 0 deletions src/aiidalab_qe/app/submission/global_settings/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

DEFAULT: dict = DEFAULT_PARAMETERS # type: ignore


class GlobalResourceSettingsModel(
ResourceSettingsModel,
HasInputStructure,
Expand Down
1 change: 1 addition & 0 deletions src/aiidalab_qe/app/submission/global_settings/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

DEFAULT: dict = DEFAULT_PARAMETERS # type: ignore


class GlobalResourceSettingsPanel(ResourceSettingsPanel[GlobalResourceSettingsModel]):
identifier = "global"

Expand Down

0 comments on commit 7c09155

Please sign in to comment.