From 6f1b458ab0ebc4d7ed02a424a74a918262843059 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 9 Oct 2024 22:43:20 +0800 Subject: [PATCH] Fix lints in notebooks --- notebooks/eln_import.ipynb | 2 +- notebooks/process.ipynb | 2 +- notebooks/wizard_apps.ipynb | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/notebooks/eln_import.ipynb b/notebooks/eln_import.ipynb index a640a50ea..e3863c868 100644 --- a/notebooks/eln_import.ipynb +++ b/notebooks/eln_import.ipynb @@ -60,7 +60,7 @@ "metadata": {}, "outputs": [], "source": [ - "url = urlparse.urlsplit(jupyter_notebook_url)\n", + "url = urlparse.urlsplit(jupyter_notebook_url) # noqa: F821\n", "parsed_url = urlparse.parse_qs(url.query)\n", "params = {key: value[0] for key, value in parsed_url.items()}\n", "eln_widget = ElnImportWidget(**params)" diff --git a/notebooks/process.ipynb b/notebooks/process.ipynb index 539be56e1..1dc8c6a53 100644 --- a/notebooks/process.ipynb +++ b/notebooks/process.ipynb @@ -58,7 +58,7 @@ "metadata": {}, "outputs": [], "source": [ - "url = urlparse.urlsplit(jupyter_notebook_url)\n", + "url = urlparse.urlsplit(jupyter_notebook_url) # noqa: F821\n", "url_dict = urlparse.parse_qs(url.query)\n", "if \"id\" in url_dict:\n", " pk = int(url_dict[\"id\"][0])\n", diff --git a/notebooks/wizard_apps.ipynb b/notebooks/wizard_apps.ipynb index 2afd03f21..c8a5fba9a 100644 --- a/notebooks/wizard_apps.ipynb +++ b/notebooks/wizard_apps.ipynb @@ -150,7 +150,10 @@ "\n", " def _confirm_configuration(self, button):\n", " \"Confirm the pizza configuration and expose as trait.\"\n", - " self.configuration = dict(style=self.style.value, toppings=self.toppings.value)\n", + " self.configuration = {\n", + " \"style\": self.style.value,\n", + " \"toppings\": self.toppings.value,\n", + " }\n", "\n", " def reset(self):\n", " with self.hold_trait_notifications():\n",