From 503faaec69fb6706e8e8ed176b0503dd7ac48c4d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:29:39 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- qe.ipynb | 7 +++---- src/aiidalab_qe/app/wrapper.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/qe.ipynb b/qe.ipynb index 7ae6eb778..cfc21bccd 100644 --- a/qe.ipynb +++ b/qe.ipynb @@ -56,9 +56,8 @@ "metadata": {}, "outputs": [], "source": [ - "from IPython.display import display\n", - "\n", "from aiidalab_qe.app.wrapper import AppWrapperContoller, AppWrapperModel, AppWrapperView\n", + "from IPython.display import display\n", "\n", "model = AppWrapperModel()\n", "view = AppWrapperView()\n", @@ -75,12 +74,12 @@ "source": [ "import urllib.parse as urlparse\n", "\n", + "from aiidalab_qe.app.main import App\n", + "\n", "from aiidalab_widgets_base.bug_report import (\n", " install_create_github_issue_exception_handler,\n", ")\n", "\n", - "from aiidalab_qe.app.main import App\n", - "\n", "install_create_github_issue_exception_handler(\n", " view.output,\n", " url=\"https://github.com/aiidalab/aiidalab-qe/issues/new\",\n", diff --git a/src/aiidalab_qe/app/wrapper.py b/src/aiidalab_qe/app/wrapper.py index 999f9aca7..c472c7ee8 100644 --- a/src/aiidalab_qe/app/wrapper.py +++ b/src/aiidalab_qe/app/wrapper.py @@ -11,7 +11,7 @@ def without_triggering(toggle: str): def decorator(func): def wrapper(self, change: dict): """Toggle off other button without triggering its callback.""" - view: AppWrapperView = getattr(self, "_view") + view: AppWrapperView = self._view button: ipw.ToggleButton = getattr(view, toggle) callback = getattr(self, f"_on_{toggle}") button.unobserve(callback, "value")