mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-12-02 02:53:41 +08:00
Type Model Laboratory AST statements explicitly
This commit is contained in:
@@ -63,7 +63,7 @@ class TestLaboratoryFrame(unittest.TestCase):
|
||||
import ast
|
||||
source = Path(__file__).resolve().parents[3] / "selfdrive/modeld/modeld.py"
|
||||
main = next(node for node in ast.parse(source.read_text()).body if isinstance(node, ast.FunctionDef) and node.name == "main")
|
||||
assignments = [node for node in ast.walk(main) if isinstance(node, ast.Assign) and
|
||||
assignments: list[ast.stmt] = [node for node in ast.walk(main) if isinstance(node, ast.Assign) and
|
||||
any(isinstance(target, ast.Name) and target.id in ("bufs", "transforms") for target in node.targets)]
|
||||
caller = compile(ast.fix_missing_locations(ast.Module(body=assignments, type_ignores=[])), str(source), "exec")
|
||||
pair = make_pair()
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "02c323c4215781c99d9860296bcf85ef5ce52e47772a862f4099b8050696b824", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "2d49f13787280f5b94d0e09bdf4d10509060bbc4cb2a35ddcf5ad88864a19bb5", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user