From d621210971e97fb59a4954c9ac9e9bd6fb9c1823 Mon Sep 17 00:00:00 2001 From: Carson Date: Tue, 17 Dec 2024 11:32:55 -0600 Subject: [PATCH] Only import TypeGuard when type checking --- shinywidgets/_shinywidgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shinywidgets/_shinywidgets.py b/shinywidgets/_shinywidgets.py index 021881e..7a6e40f 100644 --- a/shinywidgets/_shinywidgets.py +++ b/shinywidgets/_shinywidgets.py @@ -4,7 +4,7 @@ import json import os from contextlib import contextmanager -from typing import TYPE_CHECKING, Any, Optional, Sequence, TypeGuard, Union, cast +from typing import TYPE_CHECKING, Any, Optional, Sequence, Union, cast from uuid import uuid4 from weakref import WeakSet @@ -36,6 +36,7 @@ ) if TYPE_CHECKING: + from typing import TypeGuard from traitlets.traitlets import Instance