Skip to content

Commit 472a581

Browse files
committed
Moved definitions of K and V outside of TYPE_CHECKING condition
1 parent 1ae9579 commit 472a581

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

traitlets/traitlets.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,9 @@ def instance_init(self, obj: t.Any) -> None:
505505

506506
K = TypeVar("K", default=str)
507507
V = TypeVar("V", default=t.Any)
508+
else:
509+
K = TypeVar("K")
510+
V = TypeVar("V")
508511

509512

510513
# We use a type for the getter (G) and setter (G) because we allow

0 commit comments

Comments
 (0)