Skip to content

Commit 3e39970

Browse files
committed
Only import Self if type checking
1 parent 595422d commit 3e39970

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/protosym/core/sym.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010

1111
from __future__ import annotations
1212

13-
from typing import Any, Callable, Generic, Self, Sequence, TypeVar, overload
13+
from typing import TYPE_CHECKING as _TYPE_CHECKING
14+
from typing import Any, Callable, Generic, Sequence, TypeVar, overload
15+
16+
if _TYPE_CHECKING:
17+
from typing_extensions import Self
18+
1419
from weakref import WeakValueDictionary as _WeakDict
1520

1621
from protosym.core.atom import AtomType

0 commit comments

Comments
 (0)