From 285b2966f4b291b612c1f8f75042d81ec90a86ff Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Thu, 15 Feb 2024 10:55:12 +0000 Subject: [PATCH] :bug: Fix `ruff` checks --- examples/full-pipelines/slide-graph.ipynb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/full-pipelines/slide-graph.ipynb b/examples/full-pipelines/slide-graph.ipynb index 27cc0ba6f..8b10087e2 100644 --- a/examples/full-pipelines/slide-graph.ipynb +++ b/examples/full-pipelines/slide-graph.ipynb @@ -132,9 +132,8 @@ "import shutil\n", "import warnings\n", "from collections import OrderedDict\n", - "from collections.abc import Iterator\n", "from pathlib import Path\n", - "from typing import Callable\n", + "from typing import TYPE_CHECKING, Callable\n", "\n", "# Third party imports\n", "import joblib\n", @@ -192,6 +191,9 @@ " WSIReader,\n", ")\n", "\n", + "if TYPE_CHECKING: # pragma: no cover\n", + " from collections.abc import Iterator\n", + "\n", "warnings.filterwarnings(\"ignore\")\n", "mpl.rcParams[\"figure.dpi\"] = 300 # for high resolution figure in notebook" ]