Skip to content

Commit a474318

Browse files
committed
Support Python >= 3.8
1 parent d3d6087 commit a474318

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

shaketune/helpers/accelerometer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
from io import TextIOWrapper
1818
from multiprocessing import Process, Queue, Value
1919
from pathlib import Path
20-
from typing_extensions import List, Optional, Tuple, TypedDict
20+
if sys.version_info >= (3, 8):
21+
from typing import List, Optional, Tuple, TypedDict
22+
else:
23+
from typing_extensions import List, Optional, Tuple, TypedDict
2124

2225
import numpy as np
2326
from zstandard import FLUSH_FRAME, ZstdCompressor, ZstdDecompressor

shaketune/shaketune.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
import importlib
1212
import os
1313
from pathlib import Path
14-
from typing_extensions import Callable
14+
if sys.version_info >= (3, 8):
15+
from typing import Callable
16+
else:
17+
from typing_extensions import Callable
1518

1619
from .commands import (
1720
axes_shaper_calibration,

shaketune/shaketune_process.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
import traceback
1414
from multiprocessing import Process
1515
from pathlib import Path
16-
from typing_extensions import List, Optional, Union
16+
if sys.version_info >= (3, 8):
17+
from typing import List, Optional, Union
18+
else:
19+
from typing_extensions import List, Optional, Union
1720

1821
from .helpers.accelerometer import MeasurementsManager
1922
from .helpers.console_output import ConsoleOutput

0 commit comments

Comments
 (0)