Skip to content

Commit eccee25

Browse files
fix(typing): fallback to typing_extensions when importing Self
References #17
1 parent 7cbf31a commit eccee25

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

circuitpython_mocks/_mixins.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
from collections import deque
2-
from typing import Self, Deque, Union, TYPE_CHECKING
2+
from typing import Deque, Union, TYPE_CHECKING
3+
4+
try:
5+
from typing import Self
6+
except ImportError:
7+
from typing_extensions import Self
8+
39

410
if TYPE_CHECKING:
511
from circuitpython_mocks.busio.operations import (

0 commit comments

Comments
 (0)