@cryptotaxi247 / infra / commits / 8854a694

Remove the <3.8 python compatibility

Graham Christensen committed Jun 3, 2022 at 10:21 UTC 8854a694e73f4fe37ec1916d1cc611ace69f1626
1 file changed +18 -23
hydra-packet-importer/import.py
+18 -23
@@ -7,38 +7,33 @@ from pprint import pprint
7 import subprocess
8 import sys
9 from typing import Union, Dict, Any, List, Optional
10 +from typing import TypedDict
11
12 DeviceKeys = List[Dict[str, Any]]
13
13 -if sys.version_info >= (3, 8):
14 - from typing import TypedDict
14
16 - class Metadata(TypedDict):
17 - features: List[str]
18 - max_jobs: int
19 - system_types: List[str]
15 +class Metadata(TypedDict):
16 + features: List[str]
17 + max_jobs: int
18 + system_types: List[str]
19
21 - class RemoteBuilder(TypedDict):
22 - metadata: Metadata
23 - ssh_key: str
20
25 - class Device(TypedDict):
26 - hostname: str
27 - address: str
28 - type: str
29 - remote_builder_info: Union[RemoteBuilder, str]
21 +class RemoteBuilder(TypedDict):
22 + metadata: Metadata
23 + ssh_key: str
24
31 - class HostKey(TypedDict):
32 - system: str
33 - port: int
34 - key: str
25
26 +class Device(TypedDict):
27 + hostname: str
28 + address: str
29 + type: str
30 + remote_builder_info: Union[RemoteBuilder, str]
31
37 -else:
38 - Device = Dict[str, Any]
39 - RemoteBuilder = Dict[str, Any]
40 - HostKey = Dict[str, Any]
41 - Metadata = Dict[str, Any]
32 +
33 +class HostKey(TypedDict):
34 + system: str
35 + port: int
36 + key: str
37
38
39 def debug(*args: Any, **kwargs: Any) -> None: