1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | function_ast = FunctionDef(
lineno = 2 ,
col_offset = 0 ,
name = func_name,
args = arguments(
args = [
arg(
lineno = 2 ,
col_offset = 17 ,
arg = 'item' ,
annotation = Name(lineno = 2 , col_offset = 23 ,
id = model_name, ctx = Load()),
),
],
vararg = None ,
kwonlyargs = [],
kw_defaults = [],
kwarg = None ,
defaults = [],
posonlyargs = []
),
body = [
Assign(
lineno = 3 ,
col_offset = 4 ,
targets = [Name(lineno = 3 , col_offset = 4 ,
id = 'res' , ctx = Store())],
value = Call(
lineno = 3 ,
col_offset = 10 ,
func = Attribute(
lineno = 3 ,
col_offset = 10 ,
value = Attribute(
lineno = 3 ,
col_offset = 10 ,
value = Name(lineno = 3 , col_offset = 10 ,
id = 'script' , ctx = Load()),
attr = 'exports' ,
ctx = Load(),
),
attr = func_name,
ctx = Load(),
),
args = [
Starred(
lineno = 4 ,
col_offset = 38 ,
value = Call(
lineno = 4 ,
col_offset = 39 ,
func = Attribute(
lineno = 4 ,
col_offset = 39 ,
value = Call(
lineno = 4 ,
col_offset = 39 ,
func = Name(
lineno = 4 , col_offset = 39 , id = 'dict' , ctx = Load()),
args = [
Name(lineno = 4 , col_offset = 44 , id = 'item' , ctx = Load())],
keywords = [],
),
attr = 'values' ,
ctx = Load(),
),
args = [],
keywords = [],
),
ctx = Load(),
),
],
keywords = [],
),
),
Return(
lineno = 4 ,
col_offset = 4 ,
value = Name(lineno = 4 , col_offset = 11 , id = 'res' , ctx = Load()),
),
],
decorator_list = [],
returns = None ,
)
|