Skip to content

Commit 2e55b84

Browse files
authored
Merge pull request #29 from FoamyGuy/typing_fallback
fallback for Literal type py37
2 parents 84b9ba7 + a014ebc commit 2e55b84

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adafruit_vc0706.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@
2828
from micropython import const
2929

3030
try:
31-
from typing import Optional, Literal
31+
from typing import Optional
3232
import circuitpython_typing
3333
import busio
34+
35+
try:
36+
from typing import Literal
37+
except ImportError:
38+
from typing_extensions import Literal
3439
except ImportError:
3540
pass
3641

0 commit comments

Comments
 (0)