File tree Expand file tree Collapse file tree 1 file changed +21
-10
lines changed
misc/scripts/models-as-data Expand file tree Collapse file tree 1 file changed +21
-10
lines changed Original file line number Diff line number Diff line change 16
16
import tarfile
17
17
import shutil
18
18
19
+
19
20
def missing_module (module_name : str ) -> None :
20
- print (f"ERROR: { module_name } is not installed. Please install it with 'pip install { module_name } '." )
21
+ print (
22
+ f"ERROR: { module_name } is not installed. Please install it with 'pip install { module_name } '."
23
+ )
21
24
sys .exit (1 )
22
25
26
+
23
27
try :
24
28
import yaml
25
29
except ImportError :
@@ -41,14 +45,19 @@ def missing_module(module_name: str) -> None:
41
45
42
46
43
47
# A project to generate models for
44
- Project = TypedDict ("Project" , {
45
- "name" : Required [str ],
46
- "git-repo" : str ,
47
- "git-tag" : str ,
48
- "with-sinks" : bool ,
49
- "with-sources" : bool ,
50
- "with-summaries" : bool ,
51
- }, total = False )
48
+ Project = TypedDict (
49
+ "Project" ,
50
+ {
51
+ "name" : Required [str ],
52
+ "git-repo" : str ,
53
+ "git-tag" : str ,
54
+ "with-sinks" : bool ,
55
+ "with-sources" : bool ,
56
+ "with-summaries" : bool ,
57
+ },
58
+ total = False ,
59
+ )
60
+
52
61
53
62
def should_generate_sinks (project : Project ) -> bool :
54
63
return project .get ("with-sinks" , True )
@@ -107,7 +116,9 @@ def clone_project(project: Project) -> str:
107
116
return target_dir
108
117
109
118
110
- def run_in_parallel [T , U ](
119
+ def run_in_parallel [
120
+ T , U
121
+ ](
111
122
func : Callable [[T ], U ],
112
123
items : List [T ],
113
124
* ,
You can’t perform that action at this time.
0 commit comments