File tree Expand file tree Collapse file tree 2 files changed +7
-26
lines changed
Expand file tree Collapse file tree 2 files changed +7
-26
lines changed Original file line number Diff line number Diff line change 1414from buildchain import utils
1515
1616
17- def get_task_information () -> types .TaskDict :
18- """Retrieve all the task information from codegen"""
19- result : types .TaskDict = {
20- "actions" : [],
21- "task_dep" : [],
22- "file_dep" : [],
23- }
24- for task_fun in CODEGEN :
25- task = task_fun ()
26- for key , value in result .items ():
27- value .extend (task .get (key , []))
28-
29- return result
30-
31-
3217def task_codegen () -> Iterator [types .TaskDict ]:
3318 """Run the code generation tools."""
3419 for create_codegen_task in CODEGEN :
Original file line number Diff line number Diff line change 4141from buildchain import constants
4242from buildchain import types
4343from buildchain import utils
44- from buildchain import codegen
4544
4645
4746def task_lint () -> Iterator [types .TaskDict ]:
@@ -195,16 +194,13 @@ def lint_codegen() -> types.TaskDict:
195194 git_diff = [config .ExtCommand .GIT .value , "diff" ]
196195 base = subprocess .check_output (git_diff )
197196
198- task = codegen .get_task_information ()
199- task ["actions" ].append (lambda : check_diff_codegen (base ))
200- task .update (
201- {
202- "name" : "codegen" ,
203- "title" : utils .title_with_subtask_name ("LINT" ),
204- "doc" : lint_codegen .__doc__ ,
205- }
206- )
207- return task
197+ return {
198+ "name" : "codegen" ,
199+ "title" : utils .title_with_subtask_name ("LINT" ),
200+ "doc" : lint_codegen .__doc__ ,
201+ "actions" : [lambda : check_diff_codegen (base )],
202+ "task_dep" : ["codegen" ],
203+ }
208204
209205
210206# }}}
You can’t perform that action at this time.
0 commit comments