diff --git a/micro-benchmark-autogen-templates/python_features/args/multiple/main_gt.json b/micro-benchmark-autogen-templates/python_features/args/multiple/main_gt.json index 0c69035e8..9f991a611 100644 --- a/micro-benchmark-autogen-templates/python_features/args/multiple/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/args/multiple/main_gt.json @@ -41,7 +41,7 @@ "line_number": 4, "col_offset": 19, "function": "my_sum", - "parameter": "integers", + "parameter": "arguments", "type": [ "tuple" ] diff --git a/micro-benchmark-autogen-templates/python_features/assignments/augmented/main_gt.json b/micro-benchmark-autogen-templates/python_features/assignments/augmented/main_gt.json index a237dfc87..97d3a67a6 100644 --- a/micro-benchmark-autogen-templates/python_features/assignments/augmented/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/assignments/augmented/main_gt.json @@ -31,14 +31,14 @@ "line_number": 6, "col_offset": 5, "function": "func1", - "parameter": "a", + "variable": "a", "type": [ "" ] }, { "file": "main.py", - "line_number": 11, + "line_number": 10, "col_offset": 1, "variable": "b", "type": [ diff --git a/micro-benchmark-autogen-templates/python_features/assignments/nested_unpack/main.py b/micro-benchmark-autogen-templates/python_features/assignments/nested_unpack/main.py index b16ddf8b6..c48a5aee1 100644 --- a/micro-benchmark-autogen-templates/python_features/assignments/nested_unpack/main.py +++ b/micro-benchmark-autogen-templates/python_features/assignments/nested_unpack/main.py @@ -19,3 +19,4 @@ def func4(): (a, b), (c, d) = [(func1, func2), (func3, func4)] +a(); b(); c(); d(); diff --git a/micro-benchmark-autogen-templates/python_features/assignments/recursive_tuple/main_gt.json b/micro-benchmark-autogen-templates/python_features/assignments/recursive_tuple/main_gt.json index 0173db3c1..7763775b8 100644 --- a/micro-benchmark-autogen-templates/python_features/assignments/recursive_tuple/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/assignments/recursive_tuple/main_gt.json @@ -121,7 +121,7 @@ "file": "main.py", "line_number": 33, "col_offset": 1, - "function": "a", + "variable": "a", "type": [ "callable" ] @@ -174,7 +174,7 @@ { "file": "main.py", "line_number": 37, - "col_offset": 5, + "col_offset": 4, "variable": "b", "type": [ "callable" diff --git a/micro-benchmark-autogen-templates/python_features/assignments/starred/main_gt.json b/micro-benchmark-autogen-templates/python_features/assignments/starred/main_gt.json index ca865b3e1..0aa56cdff 100644 --- a/micro-benchmark-autogen-templates/python_features/assignments/starred/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/assignments/starred/main_gt.json @@ -47,7 +47,7 @@ }, { "file": "main.py", - "line_number": 18, + "line_number": 17, "col_offset": 1, "variable": "a", "type": [ @@ -56,7 +56,7 @@ }, { "file": "main.py", - "line_number": 18, + "line_number": 17, "col_offset": 5, "variable": "b", "type": [ @@ -83,7 +83,7 @@ }, { "file": "main.py", - "line_number": 18, + "line_number": 17, "col_offset": 8, "variable": "c", "type": [ @@ -92,7 +92,7 @@ }, { "file": "main.py", - "line_number": 20, + "line_number": 19, "col_offset": 1, "variable": "d", "type": [ @@ -101,7 +101,7 @@ }, { "file": "main.py", - "line_number": 21, + "line_number": 20, "col_offset": 1, "variable": "e", "type": [ @@ -110,7 +110,7 @@ }, { "file": "main.py", - "line_number": 22, + "line_number": 21, "col_offset": 1, "variable": "f", "type": [ @@ -119,7 +119,7 @@ }, { "file": "main.py", - "line_number": 23, + "line_number": 22, "col_offset": 1, "variable": "g", "type": [ diff --git a/micro-benchmark-autogen-templates/python_features/classes/abstract_class/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/abstract_class/main_gt.json index 0ee65d847..33e423630 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/abstract_class/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/abstract_class/main_gt.json @@ -11,7 +11,7 @@ "col_offset": 9, "function": "Shape.area", "type": [ - "Nonetype" + "" ] }, { @@ -38,7 +38,7 @@ "file": "main.py", "line_number": 12, "col_offset": 9, - "variable": "Rectangle.width", + "variable": "self.width", "function": "Rectangle.__init__", "type": [ "" @@ -48,7 +48,7 @@ "file": "main.py", "line_number": 13, "col_offset": 9, - "variable": "Rectangle.height", + "variable": "self.height", "function": "Rectangle.__init__", "type": [ "" @@ -57,7 +57,7 @@ { "file": "main.py", "line_number": 15, - "col_offset": 5, + "col_offset": 9, "function": "Rectangle.area", "type": [ "" @@ -82,4 +82,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/classes/assigned_self_call/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/assigned_self_call/main_gt.json index 256a39f8e..3179fd1e8 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/assigned_self_call/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/assigned_self_call/main_gt.json @@ -23,7 +23,7 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "function": "func2", + "function": "MyClass.func2", "type": [ "" ] @@ -40,8 +40,8 @@ }, { "file": "main.py", - "line_number": 1, - "col_offset": 9, + "line_number": 11, + "col_offset": 1, "variable": "a", "type": [ "MyClass" diff --git a/micro-benchmark-autogen-templates/python_features/classes/base_class_attr/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/base_class_attr/main_gt.json index b175ee85a..edabdc1b5 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/base_class_attr/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/base_class_attr/main_gt.json @@ -14,7 +14,8 @@ "file": "main.py", "line_number": 5, "col_offset": 13, - "variable": "A.B.a", + "variable": "self.a", + "function": "A.B.__init__", "type": [ "" ] diff --git a/micro-benchmark-autogen-templates/python_features/classes/base_class_calls_child/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/base_class_calls_child/main_gt.json index ee3235c9a..29701a3fa 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/base_class_calls_child/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/base_class_calls_child/main_gt.json @@ -16,14 +16,16 @@ "col_offset": 9, "function": "A.func", "type": [ - "" + "", + "" ] }, { "file": "main.py", "line_number": 9, "col_offset": 9, - "variable": "B.child", + "variable": "self.child", + "function": "B.__init__", "type": [ "callable" ] @@ -41,7 +43,8 @@ "file": "main.py", "line_number": 17, "col_offset": 9, - "variable": "C.child", + "variable": "self.child", + "function": "C.__init__", "type": [ "callable" ] @@ -92,4 +95,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/classes/class_variable/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/class_variable/main_gt.json index ae1e3579d..df9f93ed9 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/class_variable/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/class_variable/main_gt.json @@ -24,7 +24,7 @@ "line_number": 5, "col_offset": 24, "parameter": "instance_var", - "function": "__init__", + "function": "MyClass.__init__", "type": [ "" ] @@ -33,8 +33,8 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "variable": "MyClass.instance_var", - "function": "__init__", + "variable": "self.instance_var", + "function": "MyClass.__init__", "type": [ "" ] diff --git a/micro-benchmark-autogen-templates/python_features/classes/inheritance_overriding/main.py b/micro-benchmark-autogen-templates/python_features/classes/inheritance_overriding/main.py index 4c629a653..efc19fe5b 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/inheritance_overriding/main.py +++ b/micro-benchmark-autogen-templates/python_features/classes/inheritance_overriding/main.py @@ -11,3 +11,4 @@ def func(self): a = MySubClass() b = a.func() +MyClass().func() diff --git a/micro-benchmark-autogen-templates/python_features/classes/inheritance_overriding/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/inheritance_overriding/main_gt.json index a059ae9e7..1b926b2cd 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/inheritance_overriding/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/inheritance_overriding/main_gt.json @@ -13,7 +13,7 @@ { "file": "main.py", "line_number": 3, - "col_offset": 5, + "col_offset": 9, "function": "MyClass.func", "type": [ "" @@ -22,7 +22,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 9, "function": "MySubClass.func", "type": [ "" diff --git a/micro-benchmark-autogen-templates/python_features/classes/nested_class_calls/main.py b/micro-benchmark-autogen-templates/python_features/classes/nested_class_calls/main.py index 5b1ec9d36..95109f84b 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/nested_class_calls/main.py +++ b/micro-benchmark-autogen-templates/python_features/classes/nested_class_calls/main.py @@ -23,3 +23,4 @@ def func(self): a = A() b = a.func() +C().func() diff --git a/micro-benchmark-autogen-templates/python_features/classes/nested_class_calls/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/nested_class_calls/main_gt.json index 1bdf05a59..5b1c903b6 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/nested_class_calls/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/nested_class_calls/main_gt.json @@ -13,7 +13,7 @@ { "file": "main.py", "line_number": 3, - "col_offset": 5, + "col_offset": 9, "function": "C.func", "type": [ "" @@ -34,7 +34,7 @@ "line_number": 9, "col_offset": 9, "function": "B.__init__", - "variable": "B.c", + "variable": "self.c", "type": [ "C" ] @@ -53,7 +53,7 @@ "line_number": 17, "col_offset": 9, "function": "A.__init__", - "variable": "A.c", + "variable": "self.c", "type": [ "C" ] diff --git a/micro-benchmark-autogen-templates/python_features/classes/self_assign_func/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/self_assign_func/main_gt.json index c2bb6ca1a..ee7a49e0b 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/self_assign_func/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/self_assign_func/main_gt.json @@ -33,7 +33,7 @@ "file": "main.py", "line_number": 11, "col_offset": 9, - "variable": "B.a", + "variable": "self.a", "function": "B.__init__", "type": [ "A" diff --git a/micro-benchmark-autogen-templates/python_features/classes/self_assignment/main_gt.json b/micro-benchmark-autogen-templates/python_features/classes/self_assignment/main_gt.json index 75308bed0..189bb1f89 100644 --- a/micro-benchmark-autogen-templates/python_features/classes/self_assignment/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/classes/self_assignment/main_gt.json @@ -15,7 +15,7 @@ "line_number": 6, "col_offset": 9, "function": "A.__init__", - "variable": "A.smth", + "variable": "self.smth", "type": [ "callable" ] diff --git a/micro-benchmark-autogen-templates/python_features/decorators/assigned/main_gt.json b/micro-benchmark-autogen-templates/python_features/decorators/assigned/main_gt.json index 5b68fc7ab..9a2fc7d6a 100644 --- a/micro-benchmark-autogen-templates/python_features/decorators/assigned/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/decorators/assigned/main_gt.json @@ -4,7 +4,6 @@ "int", "float", "str", - "bool", "list", "tuple" ], @@ -32,7 +31,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "wrapper", + "function": "dec1.wrapper", "type": [ "" ] @@ -42,7 +41,7 @@ "line_number": 5, "col_offset": 17, "parameter": "a", - "function": "wrapper", + "function": "dec1.wrapper", "type": [ "" ] @@ -52,7 +51,7 @@ "line_number": 5, "col_offset": 20, "parameter": "b", - "function": "wrapper", + "function": "dec1.wrapper", "type": [ "" ] @@ -62,7 +61,7 @@ "line_number": 6, "col_offset": 9, "variable": "result", - "function": "wrapper", + "function": "dec1.wrapper", "type": [ "" ] @@ -115,4 +114,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/decorators/call/main_gt.json b/micro-benchmark-autogen-templates/python_features/decorators/call/main_gt.json index 0edcc1c37..feff49ec4 100644 --- a/micro-benchmark-autogen-templates/python_features/decorators/call/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/decorators/call/main_gt.json @@ -33,16 +33,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "wrapper", - "type": [ - "" - ] - }, - { - "file": "main.py", - "line_number": 12, - "col_offset": 5, - "function": "func", + "function": "dec.wrapper", "type": [ "" ] @@ -57,4 +48,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/decorators/classes/main_gt.json b/micro-benchmark-autogen-templates/python_features/decorators/classes/main_gt.json index bf0a61135..f1c3a57bf 100644 --- a/micro-benchmark-autogen-templates/python_features/decorators/classes/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/decorators/classes/main_gt.json @@ -16,7 +16,7 @@ "col_offset": 5, "function": "my_decorator", "type": [ - "my_decorator.NewClass" + "type" ] }, { @@ -26,34 +26,25 @@ "function": "my_decorator", "parameter": "cls", "type": [ - "MyClass" + "type" ] }, { "file": "main.py", "line_number": 6, "col_offset": 13, - "function": "NewClass.my_method", + "function": "my_decorator.NewClass.my_method", "type": [ "" ] }, - { - "file": "main.py", - "line_number": 14, - "col_offset": 9, - "function": "MyClass.my_method", - "type": [ - "" - ] - }, { "file": "main.py", "line_number": 18, "col_offset": 1, "variable": "a", "type": [ - "my_decorator.NewClass" + "MyClass" ] }, { @@ -66,4 +57,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/decorators/nested/main_gt.json b/micro-benchmark-autogen-templates/python_features/decorators/nested/main_gt.json index 56a326f25..1593dc60f 100644 --- a/micro-benchmark-autogen-templates/python_features/decorators/nested/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/decorators/nested/main_gt.json @@ -16,14 +16,14 @@ "col_offset": 5, "function": "func", "type": [ - "" + "" ] }, { "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "dec", + "function": "func.dec", "type": [ "callable" ] @@ -33,7 +33,7 @@ "line_number": 5, "col_offset": 13, "parameter": "f", - "function": "dec", + "function": "func.dec", "type": [ "callable" ] @@ -42,20 +42,11 @@ "file": "main.py", "line_number": 8, "col_offset": 9, - "function": "modified_inner", + "function": "func.modified_inner", "type": [ "" ] }, - { - "file": "main.py", - "line_number": 12, - "col_offset": 9, - "function": "inner", - "type": [ - "" - ] - }, { "file": "main.py", "line_number": 18, @@ -66,4 +57,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/decorators/nested_decorators/main_gt.json b/micro-benchmark-autogen-templates/python_features/decorators/nested_decorators/main_gt.json index 38014850c..8173e21e3 100644 --- a/micro-benchmark-autogen-templates/python_features/decorators/nested_decorators/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/decorators/nested_decorators/main_gt.json @@ -33,7 +33,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "inner", + "function": "dec1.inner", "type": [ "" ] @@ -52,7 +52,7 @@ "line_number": 11, "col_offset": 10, "parameter": "f", - "function": "dec", + "function": "dec2", "type": [ "callable" ] @@ -61,16 +61,7 @@ "file": "main.py", "line_number": 12, "col_offset": 9, - "function": "inner", - "type": [ - "" - ] - }, - { - "file": "main.py", - "line_number": 20, - "col_offset": 5, - "function": "func", + "function": "dec2.inner", "type": [ "" ] @@ -85,4 +76,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/decorators/param_call/main_gt.json b/micro-benchmark-autogen-templates/python_features/decorators/param_call/main_gt.json index c48212e00..0e03e896f 100644 --- a/micro-benchmark-autogen-templates/python_features/decorators/param_call/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/decorators/param_call/main_gt.json @@ -29,7 +29,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "wrapper", + "function": "dec.wrapper", "type": [ "" ] @@ -39,7 +39,7 @@ "line_number": 5, "col_offset": 17, "parameter": "a", - "function": "wrapper", + "function": "dec.wrapper", "type": [ "" ] @@ -49,7 +49,7 @@ "line_number": 5, "col_offset": 20, "parameter": "b", - "function": "wrapper", + "function": "dec.wrapper", "type": [ "" ] @@ -59,7 +59,7 @@ "line_number": 6, "col_offset": 9, "variable": "result", - "function": "wrapper", + "function": "dec.wrapper", "type": [ "" ] diff --git a/micro-benchmark-autogen-templates/python_features/decorators/return/main_gt.json b/micro-benchmark-autogen-templates/python_features/decorators/return/main_gt.json index 16a5dab76..82b11f6a2 100644 --- a/micro-benchmark-autogen-templates/python_features/decorators/return/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/decorators/return/main_gt.json @@ -23,7 +23,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "dec", + "function": "func1.dec", "type": [ "callable" ] @@ -33,7 +33,7 @@ "line_number": 5, "col_offset": 13, "parameter": "f", - "function": "dec", + "function": "func1.dec", "type": [ "callable" ] @@ -42,16 +42,7 @@ "file": "main.py", "line_number": 8, "col_offset": 9, - "function": "inner", - "type": [ - "" - ] - }, - { - "file": "main.py", - "line_number": 15, - "col_offset": 5, - "function": "func2", + "function": "func1.inner", "type": [ "" ] @@ -66,4 +57,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/decorators/return_different_func/main_gt.json b/micro-benchmark-autogen-templates/python_features/decorators/return_different_func/main_gt.json index 87ce9349b..71dcdf842 100644 --- a/micro-benchmark-autogen-templates/python_features/decorators/return_different_func/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/decorators/return_different_func/main_gt.json @@ -33,16 +33,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "inner", - "type": [ - "" - ] - }, - { - "file": "main.py", - "line_number": 12, - "col_offset": 5, - "function": "func", + "function": "dec.inner", "type": [ "" ] @@ -66,4 +57,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/dicts/assign/main.py b/micro-benchmark-autogen-templates/python_features/dicts/assign/main.py index 48f32779b..339e6527f 100644 --- a/micro-benchmark-autogen-templates/python_features/dicts/assign/main.py +++ b/micro-benchmark-autogen-templates/python_features/dicts/assign/main.py @@ -14,3 +14,4 @@ def func2(): d["a"] = func2 e = d["a"]() +func1() diff --git a/micro-benchmark-autogen-templates/python_features/dicts/nested/main.py b/micro-benchmark-autogen-templates/python_features/dicts/nested/main.py index 7341ad875..965fbc718 100644 --- a/micro-benchmark-autogen-templates/python_features/dicts/nested/main.py +++ b/micro-benchmark-autogen-templates/python_features/dicts/nested/main.py @@ -14,3 +14,4 @@ def func2(): d["a"]["b"] = func2 e = d["a"]["b"]() +func1() diff --git a/micro-benchmark-autogen-templates/python_features/dicts/param_key/main_gt.json b/micro-benchmark-autogen-templates/python_features/dicts/param_key/main_gt.json index 66bfb7223..03a4337e2 100644 --- a/micro-benchmark-autogen-templates/python_features/dicts/param_key/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/dicts/param_key/main_gt.json @@ -27,7 +27,7 @@ "parameter": "key", "function": "func1", "type": [ - "" + "str" ] }, { @@ -94,4 +94,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/dicts/update/main.py b/micro-benchmark-autogen-templates/python_features/dicts/update/main.py index 2a634f383..60a2188fe 100644 --- a/micro-benchmark-autogen-templates/python_features/dicts/update/main.py +++ b/micro-benchmark-autogen-templates/python_features/dicts/update/main.py @@ -13,3 +13,4 @@ def func2(): d.update({"a": func2}) e = d["a"]() +func1() diff --git a/micro-benchmark-autogen-templates/python_features/functions/default/main.py b/micro-benchmark-autogen-templates/python_features/functions/default/main.py index 788cbbd02..3b5954a63 100644 --- a/micro-benchmark-autogen-templates/python_features/functions/default/main.py +++ b/micro-benchmark-autogen-templates/python_features/functions/default/main.py @@ -1,5 +1,8 @@ # Defining a function with default values for its parameters. -def my_func(x=, y=): +def my_func( + x=, + y= +): return x + y diff --git a/micro-benchmark-autogen-templates/python_features/functions/default/main_gt.json b/micro-benchmark-autogen-templates/python_features/functions/default/main_gt.json index 460741888..0afea6b86 100644 --- a/micro-benchmark-autogen-templates/python_features/functions/default/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/functions/default/main_gt.json @@ -18,8 +18,8 @@ }, { "file": "main.py", - "line_number": 2, - "col_offset": 13, + "line_number": 3, + "col_offset": 5, "parameter": "x", "function": "my_func", "type": [ @@ -29,8 +29,8 @@ }, { "file": "main.py", - "line_number": 2, - "col_offset": 18, + "line_number": 4, + "col_offset": 5, "parameter": "y", "function": "my_func", "type": [ @@ -40,7 +40,7 @@ }, { "file": "main.py", - "line_number": 6, + "line_number": 9, "col_offset": 1, "variable": "result1", "type": [ @@ -49,7 +49,7 @@ }, { "file": "main.py", - "line_number": 7, + "line_number": 10, "col_offset": 1, "variable": "result2", "type": [ @@ -58,7 +58,7 @@ }, { "file": "main.py", - "line_number": 8, + "line_number": 11, "col_offset": 1, "variable": "result3", "type": [ diff --git a/micro-benchmark-autogen-templates/python_features/functions/nested/main_gt.json b/micro-benchmark-autogen-templates/python_features/functions/nested/main_gt.json index ff852f174..98cd18378 100644 --- a/micro-benchmark-autogen-templates/python_features/functions/nested/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/functions/nested/main_gt.json @@ -29,7 +29,7 @@ "file": "main.py", "line_number": 7, "col_offset": 9, - "function": "inner", + "function": "outer.inner", "type": [ "" ] @@ -38,7 +38,8 @@ "file": "main.py", "line_number": 9, "col_offset": 9, - "function": "inner", + "function": "outer.inner", + "variable": "x", "type": [ "" ] diff --git a/micro-benchmark-autogen-templates/python_features/functions/static/main_gt.json b/micro-benchmark-autogen-templates/python_features/functions/static/main_gt.json index 043680a0f..b14812f96 100644 --- a/micro-benchmark-autogen-templates/python_features/functions/static/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/functions/static/main_gt.json @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 5, + "col_offset": 9, "function": "MyClass.my_static_method", "type": [ "" diff --git a/micro-benchmark-autogen-templates/python_features/generators/iter_param/main_gt.json b/micro-benchmark-autogen-templates/python_features/generators/iter_param/main_gt.json index ebf769209..ecbc6826e 100644 --- a/micro-benchmark-autogen-templates/python_features/generators/iter_param/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/generators/iter_param/main_gt.json @@ -90,7 +90,7 @@ "file": "main.py", "line_number": 11, "col_offset": 9, - "variable": "Cls.max", + "variable": "self.max", "function": "Cls.__init__", "type": [ "int" @@ -109,7 +109,7 @@ "file": "main.py", "line_number": 14, "col_offset": 9, - "variable": "Cls.n", + "variable": "self.n", "function": "Cls.__iter__", "type": [ "int" @@ -138,7 +138,7 @@ "file": "main.py", "line_number": 22, "col_offset": 9, - "variable": "Cls.n", + "variable": "self.n", "function": "Cls.__next__", "type": [ "int" diff --git a/micro-benchmark-autogen-templates/python_features/generators/iter_return/main_gt.json b/micro-benchmark-autogen-templates/python_features/generators/iter_return/main_gt.json index b31310540..d5dcf56cd 100644 --- a/micro-benchmark-autogen-templates/python_features/generators/iter_return/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/generators/iter_return/main_gt.json @@ -33,7 +33,7 @@ "file": "main.py", "line_number": 10, "col_offset": 9, - "variable": "Cls.max", + "variable": "self.max", "function": "Cls.__init__", "type": [ "int" @@ -53,7 +53,7 @@ "line_number": 13, "col_offset": 9, "function": "Cls.__iter__", - "variable": "Cls.n", + "variable": "self.n", "type": [ "int" ] @@ -72,7 +72,7 @@ "line_number": 19, "col_offset": 9, "function": "Cls.__next__", - "variable": "Cls.n", + "variable": "self.n", "type": [ "int" ] diff --git a/micro-benchmark-autogen-templates/python_features/generators/iterable/main_gt.json b/micro-benchmark-autogen-templates/python_features/generators/iterable/main_gt.json index c2717775d..713816eec 100644 --- a/micro-benchmark-autogen-templates/python_features/generators/iterable/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/generators/iterable/main_gt.json @@ -18,8 +18,8 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "parameter": "func.n", "function": "func.__init__", + "variable": "self.n", "type": [ "int" ] @@ -28,8 +28,8 @@ "file": "main.py", "line_number": 7, "col_offset": 9, - "parameter": "func.num", "function": "func.__init__", + "variable": "self.num", "type": [ "int" ] @@ -49,8 +49,7 @@ "col_offset": 9, "function": "func.__next__", "type": [ - "int", - "Nonetype" + "int" ] }, { @@ -67,7 +66,7 @@ "file": "main.py", "line_number": 14, "col_offset": 18, - "variable": "func.num", + "variable": "self.num", "function": "func.__next__", "type": [ "int" @@ -119,4 +118,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/generators/iterable_assigned/main_gt.json b/micro-benchmark-autogen-templates/python_features/generators/iterable_assigned/main_gt.json index 57ee1ef4f..740452e7d 100644 --- a/micro-benchmark-autogen-templates/python_features/generators/iterable_assigned/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/generators/iterable_assigned/main_gt.json @@ -21,7 +21,7 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "variable": "Cls.max", + "variable": "self.max", "function": "Cls.__init__", "type": [ "int" @@ -41,7 +41,7 @@ "line_number": 9, "col_offset": 9, "function": "Cls.__iter__", - "variable": "Cls.n", + "variable": "self.n", "type": [ "int" ] @@ -52,8 +52,7 @@ "col_offset": 9, "function": "Cls.__next__", "type": [ - "int", - "Nonetype" + "" ] }, { @@ -70,7 +69,7 @@ "file": "main.py", "line_number": 17, "col_offset": 9, - "variable": "Cls.n", + "variable": "self.n", "function": "Cls.__next__", "type": [ "int" @@ -131,4 +130,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/imports/chained_import/main_gt.json b/micro-benchmark-autogen-templates/python_features/imports/chained_import/main_gt.json index edf785f13..6eaf90502 100644 --- a/micro-benchmark-autogen-templates/python_features/imports/chained_import/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/imports/chained_import/main_gt.json @@ -16,8 +16,8 @@ "ground_truth": [ { "file": "main.py", - "line_number": 5, - "col_offset": 5, + "line_number": 7, + "col_offset": 1, "variable": "a", "type": [ "" diff --git a/micro-benchmark-autogen-templates/python_features/imports/relative_import/main.py b/micro-benchmark-autogen-templates/python_features/imports/relative_import/main.py index 2fe09a26c..718ea4611 100644 --- a/micro-benchmark-autogen-templates/python_features/imports/relative_import/main.py +++ b/micro-benchmark-autogen-templates/python_features/imports/relative_import/main.py @@ -10,3 +10,4 @@ def func(): a = nested.to_import.func() +func() diff --git a/micro-benchmark-autogen-templates/python_features/kwargs/multiple/main_gt.json b/micro-benchmark-autogen-templates/python_features/kwargs/multiple/main_gt.json index 113cf8a3f..61e8a8ddb 100644 --- a/micro-benchmark-autogen-templates/python_features/kwargs/multiple/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/kwargs/multiple/main_gt.json @@ -9,7 +9,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 1, + "col_offset": 5, "function": "concatenate", "type": [ "" @@ -18,7 +18,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 17, + "col_offset": 19, "function": "concatenate", "parameter": "kwargs", "type": [ @@ -30,6 +30,7 @@ "line_number": 5, "col_offset": 5, "variable": "result", + "function": "concatenate", "type": [ "" ] @@ -39,6 +40,7 @@ "line_number": 6, "col_offset": 9, "variable": "arg", + "function": "concatenate", "type": [ "" ] diff --git a/micro-benchmark-autogen-templates/python_features/lambdas/chained_calls/main.py b/micro-benchmark-autogen-templates/python_features/lambdas/chained_calls/main.py index f3fbc9f15..f4227dff5 100644 --- a/micro-benchmark-autogen-templates/python_features/lambdas/chained_calls/main.py +++ b/micro-benchmark-autogen-templates/python_features/lambdas/chained_calls/main.py @@ -15,4 +15,8 @@ def func1(a, b, c): return func2(b, c) -d = func1(lambda x: x + , lambda x: x + , lambda x: x + ) +d = func1( + lambda x: x + , + lambda x: x + , + lambda x: x + +) diff --git a/micro-benchmark-autogen-templates/python_features/lambdas/chained_calls/main_gt.json b/micro-benchmark-autogen-templates/python_features/lambdas/chained_calls/main_gt.json index f3ba45241..f8c4ff3ea 100644 --- a/micro-benchmark-autogen-templates/python_features/lambdas/chained_calls/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/lambdas/chained_calls/main_gt.json @@ -104,8 +104,8 @@ }, { "file": "main.py", - "line_number": 18, - "col_offset": 18, + "line_number": 19, + "col_offset": 12, "function": "lambda", "variable": "x", "type": [ @@ -114,8 +114,8 @@ }, { "file": "main.py", - "line_number": 18, - "col_offset": 35, + "line_number": 20, + "col_offset": 12, "function": "lambda", "variable": "x", "type": [ @@ -124,8 +124,8 @@ }, { "file": "main.py", - "line_number": 18, - "col_offset": 52, + "line_number": 21, + "col_offset": 12, "function": "lambda", "variable": "x", "type": [ @@ -133,4 +133,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/lambdas/composition/main.py b/micro-benchmark-autogen-templates/python_features/lambdas/composition/main.py index 9fdf325c6..ddd3e2e55 100644 --- a/micro-benchmark-autogen-templates/python_features/lambdas/composition/main.py +++ b/micro-benchmark-autogen-templates/python_features/lambdas/composition/main.py @@ -1,4 +1,6 @@ # Chaining multiple function calls using lambda functions. -result = (lambda x: x + )((lambda x: x * )()) +result = ( + lambda x: x + +)((lambda x: x * )()) diff --git a/micro-benchmark-autogen-templates/python_features/lambdas/composition/main_gt.json b/micro-benchmark-autogen-templates/python_features/lambdas/composition/main_gt.json index 64e49a469..a54b844ef 100644 --- a/micro-benchmark-autogen-templates/python_features/lambdas/composition/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/lambdas/composition/main_gt.json @@ -16,8 +16,8 @@ }, { "file": "main.py", - "line_number": 4, - "col_offset": 18, + "line_number": 5, + "col_offset": 12, "function": "lambda", "variable": "x", "type": [ @@ -26,8 +26,8 @@ }, { "file": "main.py", - "line_number": 4, - "col_offset": 36, + "line_number": 6, + "col_offset": 11, "function": "lambda", "variable": "x", "type": [ @@ -35,4 +35,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/lists/ext_index/main.py b/micro-benchmark-autogen-templates/python_features/lists/ext_index/main.py index a8099fab5..09e97c5c9 100644 --- a/micro-benchmark-autogen-templates/python_features/lists/ext_index/main.py +++ b/micro-benchmark-autogen-templates/python_features/lists/ext_index/main.py @@ -15,3 +15,4 @@ def func2(): ls = [func1, func2] a = ls[key]() +func1() diff --git a/micro-benchmark-autogen-templates/python_features/lists/nested/main.py b/micro-benchmark-autogen-templates/python_features/lists/nested/main.py index 825cb2477..03f4153f5 100644 --- a/micro-benchmark-autogen-templates/python_features/lists/nested/main.py +++ b/micro-benchmark-autogen-templates/python_features/lists/nested/main.py @@ -14,3 +14,4 @@ def func2(): a = ls[0] b = a[0] c = b() +func2() diff --git a/micro-benchmark-autogen-templates/python_features/lists/param_index/main_gt.json b/micro-benchmark-autogen-templates/python_features/lists/param_index/main_gt.json index bbcdf7c87..8629988f1 100644 --- a/micro-benchmark-autogen-templates/python_features/lists/param_index/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/lists/param_index/main_gt.json @@ -35,7 +35,7 @@ "parameter": "key", "function": "func1", "type": [ - "" + "int" ] }, { @@ -57,4 +57,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/lists/slice/main.py b/micro-benchmark-autogen-templates/python_features/lists/slice/main.py index f13bd72ed..ba7365f92 100644 --- a/micro-benchmark-autogen-templates/python_features/lists/slice/main.py +++ b/micro-benchmark-autogen-templates/python_features/lists/slice/main.py @@ -18,3 +18,4 @@ def func3(): ls2 = ls[1:3] c = ls2[0]() +func1(); func3() diff --git a/micro-benchmark-autogen-templates/python_features/mro/basic_init/main_gt.json b/micro-benchmark-autogen-templates/python_features/mro/basic_init/main_gt.json index 4fa9d6088..ec9eea14e 100644 --- a/micro-benchmark-autogen-templates/python_features/mro/basic_init/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/mro/basic_init/main_gt.json @@ -15,7 +15,7 @@ "line_number": 7, "col_offset": 9, "function": "A.__init__", - "variable": "A.a", + "variable": "self.a", "type": [ "" ] diff --git a/micro-benchmark-autogen-templates/python_features/mro/parents_same_superclass/main.py b/micro-benchmark-autogen-templates/python_features/mro/parents_same_superclass/main.py index 1d38175dd..306ee30d7 100644 --- a/micro-benchmark-autogen-templates/python_features/mro/parents_same_superclass/main.py +++ b/micro-benchmark-autogen-templates/python_features/mro/parents_same_superclass/main.py @@ -27,3 +27,4 @@ class D(B, C): d = D() e = d.func() +A().func() diff --git a/micro-benchmark-autogen-templates/python_features/mro/parents_same_superclass/main_gt.json b/micro-benchmark-autogen-templates/python_features/mro/parents_same_superclass/main_gt.json index dae7b0893..868b00d31 100644 --- a/micro-benchmark-autogen-templates/python_features/mro/parents_same_superclass/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/mro/parents_same_superclass/main_gt.json @@ -25,7 +25,7 @@ "col_offset": 9, "function": "C.func", "type": [ - "int" + "" ] }, { @@ -47,4 +47,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark-autogen-templates/python_features/mro/self_assignment/main.py b/micro-benchmark-autogen-templates/python_features/mro/self_assignment/main.py index bd186ca88..d1415016a 100644 --- a/micro-benchmark-autogen-templates/python_features/mro/self_assignment/main.py +++ b/micro-benchmark-autogen-templates/python_features/mro/self_assignment/main.py @@ -23,3 +23,4 @@ def func(self): a.funca() b = a.smth() +B().func() diff --git a/micro-benchmark-autogen-templates/python_features/mro/self_assignment/main_gt.json b/micro-benchmark-autogen-templates/python_features/mro/self_assignment/main_gt.json index 80f020805..73948566b 100644 --- a/micro-benchmark-autogen-templates/python_features/mro/self_assignment/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/mro/self_assignment/main_gt.json @@ -24,7 +24,7 @@ "line_number": 6, "col_offset": 9, "function": "B.funcb", - "variable": "B.smth", + "variable": "self.smth", "type": [ "callable" ] @@ -52,7 +52,7 @@ "line_number": 14, "col_offset": 9, "function": "A.funca", - "variable": "A.smth", + "variable": "self.smth", "type": [ "callable" ] diff --git a/micro-benchmark-autogen-templates/python_features/mro/two_parents/main.py b/micro-benchmark-autogen-templates/python_features/mro/two_parents/main.py index 64359b6aa..80afc937e 100644 --- a/micro-benchmark-autogen-templates/python_features/mro/two_parents/main.py +++ b/micro-benchmark-autogen-templates/python_features/mro/two_parents/main.py @@ -20,3 +20,4 @@ class C(A, B): c = C() d = c.func() +B().func() diff --git a/micro-benchmark-autogen-templates/python_features/mro/two_parents_method_defined/main.py b/micro-benchmark-autogen-templates/python_features/mro/two_parents_method_defined/main.py index 4b6f6bc52..532a67719 100644 --- a/micro-benchmark-autogen-templates/python_features/mro/two_parents_method_defined/main.py +++ b/micro-benchmark-autogen-templates/python_features/mro/two_parents_method_defined/main.py @@ -24,3 +24,4 @@ def func(self): c = C() d = c.func() +A().func(); B().func() diff --git a/micro-benchmark-autogen-templates/python_features/mro/two_parents_method_defined/main_gt.json b/micro-benchmark-autogen-templates/python_features/mro/two_parents_method_defined/main_gt.json index 618fc7edc..e20893d3f 100644 --- a/micro-benchmark-autogen-templates/python_features/mro/two_parents_method_defined/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/mro/two_parents_method_defined/main_gt.json @@ -41,7 +41,7 @@ "file": "main.py", "line_number": 25, "col_offset": 1, - "variable": "C", + "variable": "c", "type": [ "" ] diff --git a/micro-benchmark-autogen-templates/python_features/returns/object/main_gt.json b/micro-benchmark-autogen-templates/python_features/returns/object/main_gt.json index 665fc86db..a4a2e2aa6 100644 --- a/micro-benchmark-autogen-templates/python_features/returns/object/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/returns/object/main_gt.json @@ -15,7 +15,7 @@ "line_number": 5, "col_offset": 24, "parameter": "name", - "function": "__init__", + "function": "Person.__init__", "type": [ "str" ] @@ -25,7 +25,7 @@ "line_number": 5, "col_offset": 30, "parameter": "age", - "function": "__init__", + "function": "Person.__init__", "type": [ "int" ] @@ -34,8 +34,8 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "variable": "Person.name", - "function": "__init__", + "variable": "self.name", + "function": "Person.__init__", "type": [ "str" ] @@ -44,8 +44,8 @@ "file": "main.py", "line_number": 7, "col_offset": 9, - "parameter": "Person.age", - "function": "__init__", + "function": "Person.__init__", + "variable": "self.age", "type": [ "int" ] diff --git a/micro-benchmark-autogen-templates/python_features/returns/return_types/main.py b/micro-benchmark-autogen-templates/python_features/returns/return_types/main.py index edb3a5d35..1f25ed9ee 100644 --- a/micro-benchmark-autogen-templates/python_features/returns/return_types/main.py +++ b/micro-benchmark-autogen-templates/python_features/returns/return_types/main.py @@ -20,8 +20,8 @@ def func1(): # return_namedtuple +Point = namedtuple("Point", ["x", "y"]) def func3(): - Point = namedtuple("Point", ["x", "y"]) return Point(1, 2) diff --git a/micro-benchmark-autogen-templates/python_features/returns/return_types/main_gt.json b/micro-benchmark-autogen-templates/python_features/returns/return_types/main_gt.json index 30e7c273d..ba76904f0 100644 --- a/micro-benchmark-autogen-templates/python_features/returns/return_types/main_gt.json +++ b/micro-benchmark-autogen-templates/python_features/returns/return_types/main_gt.json @@ -48,7 +48,7 @@ }, { "file": "main.py", - "line_number": 23, + "line_number": 24, "col_offset": 5, "function": "func3", "type": [ @@ -57,9 +57,8 @@ }, { "file": "main.py", - "line_number": 24, - "col_offset": 5, - "function": "func3", + "line_number": 23, + "col_offset": 1, "variable": "Point", "type": [ "type" @@ -121,4 +120,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/micro-benchmark/python_features/assignments/augmented/main_gt.json b/micro-benchmark/python_features/assignments/augmented/main_gt.json index 94db0b587..948ce8a2c 100644 --- a/micro-benchmark/python_features/assignments/augmented/main_gt.json +++ b/micro-benchmark/python_features/assignments/augmented/main_gt.json @@ -23,7 +23,7 @@ "line_number": 6, "col_offset": 5, "function": "func1", - "parameter": "a", + "variable": "a", "type": [ "int" ] @@ -33,7 +33,7 @@ "line_number": 7, "col_offset": 5, "function": "func1", - "parameter": "a", + "variable": "a", "type": [ "int" ] diff --git a/micro-benchmark/python_features/assignments/nested_unpack/main.py b/micro-benchmark/python_features/assignments/nested_unpack/main.py index 9f8680924..3b42bc39a 100644 --- a/micro-benchmark/python_features/assignments/nested_unpack/main.py +++ b/micro-benchmark/python_features/assignments/nested_unpack/main.py @@ -19,3 +19,4 @@ def func4(): (a, b), (c, d) = [(func1, func2), (func3, func4)] +a(); b(); c(); d(); diff --git a/micro-benchmark/python_features/assignments/recursive_tuple/main_gt.json b/micro-benchmark/python_features/assignments/recursive_tuple/main_gt.json index 8e6828646..614127264 100644 --- a/micro-benchmark/python_features/assignments/recursive_tuple/main_gt.json +++ b/micro-benchmark/python_features/assignments/recursive_tuple/main_gt.json @@ -111,7 +111,7 @@ "file": "main.py", "line_number": 33, "col_offset": 1, - "function": "a", + "variable": "a", "type": [ "callable" ] @@ -164,7 +164,7 @@ { "file": "main.py", "line_number": 37, - "col_offset": 5, + "col_offset": 4, "variable": "b", "type": [ "callable" diff --git a/micro-benchmark/python_features/classes/abstract_class/main_gt.json b/micro-benchmark/python_features/classes/abstract_class/main_gt.json index e4cb695bd..14dca18fd 100644 --- a/micro-benchmark/python_features/classes/abstract_class/main_gt.json +++ b/micro-benchmark/python_features/classes/abstract_class/main_gt.json @@ -5,7 +5,7 @@ "col_offset": 9, "function": "Shape.area", "type": [ - "Nonetype" + "int" ] }, { @@ -32,7 +32,7 @@ "file": "main.py", "line_number": 12, "col_offset": 9, - "variable": "Rectangle.width", + "variable": "self.width", "function": "Rectangle.__init__", "type": [ "int" @@ -42,7 +42,7 @@ "file": "main.py", "line_number": 13, "col_offset": 9, - "variable": "Rectangle.height", + "variable": "self.height", "function": "Rectangle.__init__", "type": [ "int" @@ -51,7 +51,7 @@ { "file": "main.py", "line_number": 15, - "col_offset": 5, + "col_offset": 9, "function": "Rectangle.area", "type": [ "int" diff --git a/micro-benchmark/python_features/classes/assigned_self_call/main_gt.json b/micro-benchmark/python_features/classes/assigned_self_call/main_gt.json index 4bb9153b8..8438f07ee 100644 --- a/micro-benchmark/python_features/classes/assigned_self_call/main_gt.json +++ b/micro-benchmark/python_features/classes/assigned_self_call/main_gt.json @@ -12,7 +12,7 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "function": "func2", + "function": "MyClass.func2", "type": [ "str" ] @@ -29,8 +29,8 @@ }, { "file": "main.py", - "line_number": 1, - "col_offset": 9, + "line_number": 11, + "col_offset": 1, "variable": "a", "type": [ "MyClass" diff --git a/micro-benchmark/python_features/classes/base_class_attr/main_gt.json b/micro-benchmark/python_features/classes/base_class_attr/main_gt.json index 54f430912..69cc142c8 100644 --- a/micro-benchmark/python_features/classes/base_class_attr/main_gt.json +++ b/micro-benchmark/python_features/classes/base_class_attr/main_gt.json @@ -3,7 +3,8 @@ "file": "main.py", "line_number": 5, "col_offset": 13, - "variable": "A.B.a", + "variable": "self.a", + "function": "A.B.__init__", "type": [ "str" ] diff --git a/micro-benchmark/python_features/classes/base_class_calls_child/main_gt.json b/micro-benchmark/python_features/classes/base_class_calls_child/main_gt.json index 95289e0fa..a6bfe8120 100644 --- a/micro-benchmark/python_features/classes/base_class_calls_child/main_gt.json +++ b/micro-benchmark/python_features/classes/base_class_calls_child/main_gt.json @@ -5,14 +5,16 @@ "col_offset": 9, "function": "A.func", "type": [ - "str" + "str", + "int" ] }, { "file": "main.py", "line_number": 9, "col_offset": 9, - "variable": "B.child", + "variable": "self.child", + "function": "B.__init__", "type": [ "callable" ] @@ -30,7 +32,8 @@ "file": "main.py", "line_number": 17, "col_offset": 9, - "variable": "C.child", + "variable": "self.child", + "function": "C.__init__", "type": [ "callable" ] diff --git a/micro-benchmark/python_features/classes/class_variable/main_gt.json b/micro-benchmark/python_features/classes/class_variable/main_gt.json index eff3b7a68..7ebe04199 100644 --- a/micro-benchmark/python_features/classes/class_variable/main_gt.json +++ b/micro-benchmark/python_features/classes/class_variable/main_gt.json @@ -13,7 +13,7 @@ "line_number": 5, "col_offset": 24, "parameter": "instance_var", - "function": "__init__", + "function": "MyClass.__init__", "type": [ "int" ] @@ -22,8 +22,8 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "variable": "MyClass.instance_var", - "function": "__init__", + "variable": "self.instance_var", + "function": "MyClass.__init__", "type": [ "int" ] diff --git a/micro-benchmark/python_features/classes/inheritance_overriding/main.py b/micro-benchmark/python_features/classes/inheritance_overriding/main.py index 44ef5f06d..51070e3d5 100644 --- a/micro-benchmark/python_features/classes/inheritance_overriding/main.py +++ b/micro-benchmark/python_features/classes/inheritance_overriding/main.py @@ -8,6 +8,6 @@ class MySubClass(MyClass): def func(self): return 42 - +MyClass().func() a = MySubClass() b = a.func() diff --git a/micro-benchmark/python_features/classes/inheritance_overriding/main_gt.json b/micro-benchmark/python_features/classes/inheritance_overriding/main_gt.json index cb9ea8ed3..5f0b8cbe8 100644 --- a/micro-benchmark/python_features/classes/inheritance_overriding/main_gt.json +++ b/micro-benchmark/python_features/classes/inheritance_overriding/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 3, - "col_offset": 5, + "col_offset": 9, "function": "MyClass.func", "type": [ "str" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 9, "function": "MySubClass.func", "type": [ "int" diff --git a/micro-benchmark/python_features/classes/nested_class_calls/main.py b/micro-benchmark/python_features/classes/nested_class_calls/main.py index 62b48e851..503b65cc4 100644 --- a/micro-benchmark/python_features/classes/nested_class_calls/main.py +++ b/micro-benchmark/python_features/classes/nested_class_calls/main.py @@ -23,3 +23,4 @@ def func(self): a = A() b = a.func() +C().func() diff --git a/micro-benchmark/python_features/classes/nested_class_calls/main_gt.json b/micro-benchmark/python_features/classes/nested_class_calls/main_gt.json index aaa41487a..11936982e 100644 --- a/micro-benchmark/python_features/classes/nested_class_calls/main_gt.json +++ b/micro-benchmark/python_features/classes/nested_class_calls/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 3, - "col_offset": 5, + "col_offset": 9, "function": "C.func", "type": [ "str" @@ -23,7 +23,7 @@ "line_number": 9, "col_offset": 9, "function": "B.__init__", - "variable": "B.c", + "variable": "self.c", "type": [ "C" ] @@ -42,7 +42,7 @@ "line_number": 17, "col_offset": 9, "function": "A.__init__", - "variable": "A.c", + "variable": "self.c", "type": [ "C" ] diff --git a/micro-benchmark/python_features/classes/self_assign_func/main_gt.json b/micro-benchmark/python_features/classes/self_assign_func/main_gt.json index 46b3f11c8..c245bab89 100644 --- a/micro-benchmark/python_features/classes/self_assign_func/main_gt.json +++ b/micro-benchmark/python_features/classes/self_assign_func/main_gt.json @@ -22,7 +22,7 @@ "file": "main.py", "line_number": 11, "col_offset": 9, - "variable": "B.a", + "variable": "self.a", "function": "B.__init__", "type": [ "A" diff --git a/micro-benchmark/python_features/classes/self_assignment/main_gt.json b/micro-benchmark/python_features/classes/self_assignment/main_gt.json index 25ec35008..564e8823d 100644 --- a/micro-benchmark/python_features/classes/self_assignment/main_gt.json +++ b/micro-benchmark/python_features/classes/self_assignment/main_gt.json @@ -4,7 +4,7 @@ "line_number": 6, "col_offset": 9, "function": "A.__init__", - "variable": "A.smth", + "variable": "self.smth", "type": [ "callable" ] diff --git a/micro-benchmark/python_features/decorators/assigned/main_gt.json b/micro-benchmark/python_features/decorators/assigned/main_gt.json index b6355dbf2..36dc05fff 100644 --- a/micro-benchmark/python_features/decorators/assigned/main_gt.json +++ b/micro-benchmark/python_features/decorators/assigned/main_gt.json @@ -22,7 +22,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "wrapper", + "function": "dec1.wrapper", "type": [ "str" ] @@ -32,7 +32,7 @@ "line_number": 5, "col_offset": 17, "parameter": "a", - "function": "wrapper", + "function": "dec1.wrapper", "type": [ "str" ] @@ -42,7 +42,7 @@ "line_number": 5, "col_offset": 20, "parameter": "b", - "function": "wrapper", + "function": "dec1.wrapper", "type": [ "str" ] @@ -52,7 +52,7 @@ "line_number": 6, "col_offset": 9, "variable": "result", - "function": "wrapper", + "function": "dec1.wrapper", "type": [ "str" ] diff --git a/micro-benchmark/python_features/decorators/call/main_gt.json b/micro-benchmark/python_features/decorators/call/main_gt.json index fe499b927..cf60aa2f4 100644 --- a/micro-benchmark/python_features/decorators/call/main_gt.json +++ b/micro-benchmark/python_features/decorators/call/main_gt.json @@ -22,16 +22,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "wrapper", - "type": [ - "str" - ] - }, - { - "file": "main.py", - "line_number": 12, - "col_offset": 5, - "function": "func", + "function": "dec.wrapper", "type": [ "str" ] diff --git a/micro-benchmark/python_features/decorators/classes/main_gt.json b/micro-benchmark/python_features/decorators/classes/main_gt.json index 544319a3b..5ee2c4361 100644 --- a/micro-benchmark/python_features/decorators/classes/main_gt.json +++ b/micro-benchmark/python_features/decorators/classes/main_gt.json @@ -5,7 +5,7 @@ "col_offset": 5, "function": "my_decorator", "type": [ - "my_decorator.NewClass" + "type" ] }, { @@ -15,34 +15,25 @@ "function": "my_decorator", "parameter": "cls", "type": [ - "MyClass" + "type" ] }, { "file": "main.py", "line_number": 6, "col_offset": 13, - "function": "NewClass.my_method", + "function": "my_decorator.NewClass.my_method", "type": [ "str" ] }, - { - "file": "main.py", - "line_number": 14, - "col_offset": 9, - "function": "MyClass.my_method", - "type": [ - "int" - ] - }, { "file": "main.py", "line_number": 18, "col_offset": 1, "variable": "a", "type": [ - "my_decorator.NewClass" + "MyClass" ] }, { diff --git a/micro-benchmark/python_features/decorators/nested/main_gt.json b/micro-benchmark/python_features/decorators/nested/main_gt.json index 8012c4a88..d1150dbde 100644 --- a/micro-benchmark/python_features/decorators/nested/main_gt.json +++ b/micro-benchmark/python_features/decorators/nested/main_gt.json @@ -5,14 +5,14 @@ "col_offset": 5, "function": "func", "type": [ - "str" + "int" ] }, { "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "dec", + "function": "func.dec", "type": [ "callable" ] @@ -22,7 +22,7 @@ "line_number": 5, "col_offset": 13, "parameter": "f", - "function": "dec", + "function": "func.dec", "type": [ "callable" ] @@ -31,20 +31,11 @@ "file": "main.py", "line_number": 8, "col_offset": 9, - "function": "modified_inner", + "function": "func.modified_inner", "type": [ "int" ] }, - { - "file": "main.py", - "line_number": 12, - "col_offset": 9, - "function": "inner", - "type": [ - "str" - ] - }, { "file": "main.py", "line_number": 18, diff --git a/micro-benchmark/python_features/decorators/nested_decorators/main_gt.json b/micro-benchmark/python_features/decorators/nested_decorators/main_gt.json index b2f4d32ee..59507e02f 100644 --- a/micro-benchmark/python_features/decorators/nested_decorators/main_gt.json +++ b/micro-benchmark/python_features/decorators/nested_decorators/main_gt.json @@ -22,7 +22,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "inner", + "function": "dec1.inner", "type": [ "int" ] @@ -41,7 +41,7 @@ "line_number": 11, "col_offset": 10, "parameter": "f", - "function": "dec", + "function": "dec2", "type": [ "callable" ] @@ -50,16 +50,7 @@ "file": "main.py", "line_number": 12, "col_offset": 9, - "function": "inner", - "type": [ - "int" - ] - }, - { - "file": "main.py", - "line_number": 20, - "col_offset": 5, - "function": "func", + "function": "dec2.inner", "type": [ "int" ] diff --git a/micro-benchmark/python_features/decorators/param_call/main_gt.json b/micro-benchmark/python_features/decorators/param_call/main_gt.json index bf9af2041..87fc23327 100644 --- a/micro-benchmark/python_features/decorators/param_call/main_gt.json +++ b/micro-benchmark/python_features/decorators/param_call/main_gt.json @@ -22,7 +22,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "wrapper", + "function": "dec.wrapper", "type": [ "str" ] @@ -32,7 +32,7 @@ "line_number": 5, "col_offset": 17, "parameter": "a", - "function": "wrapper", + "function": "dec.wrapper", "type": [ "str" ] @@ -42,7 +42,7 @@ "line_number": 5, "col_offset": 20, "parameter": "b", - "function": "wrapper", + "function": "dec.wrapper", "type": [ "str" ] @@ -52,7 +52,7 @@ "line_number": 6, "col_offset": 9, "variable": "result", - "function": "wrapper", + "function": "dec.wrapper", "type": [ "str" ] diff --git a/micro-benchmark/python_features/decorators/return/main_gt.json b/micro-benchmark/python_features/decorators/return/main_gt.json index 98f80a4ba..5a6cbdf6a 100644 --- a/micro-benchmark/python_features/decorators/return/main_gt.json +++ b/micro-benchmark/python_features/decorators/return/main_gt.json @@ -12,7 +12,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "dec", + "function": "func1.dec", "type": [ "callable" ] @@ -22,7 +22,7 @@ "line_number": 5, "col_offset": 13, "parameter": "f", - "function": "dec", + "function": "func1.dec", "type": [ "callable" ] @@ -31,16 +31,7 @@ "file": "main.py", "line_number": 8, "col_offset": 9, - "function": "inner", - "type": [ - "int" - ] - }, - { - "file": "main.py", - "line_number": 15, - "col_offset": 5, - "function": "func2", + "function": "func1.inner", "type": [ "int" ] diff --git a/micro-benchmark/python_features/decorators/return_different_func/main_gt.json b/micro-benchmark/python_features/decorators/return_different_func/main_gt.json index 51d0c5350..d02817b72 100644 --- a/micro-benchmark/python_features/decorators/return_different_func/main_gt.json +++ b/micro-benchmark/python_features/decorators/return_different_func/main_gt.json @@ -22,16 +22,7 @@ "file": "main.py", "line_number": 5, "col_offset": 9, - "function": "inner", - "type": [ - "str" - ] - }, - { - "file": "main.py", - "line_number": 12, - "col_offset": 5, - "function": "func", + "function": "dec.inner", "type": [ "str" ] diff --git a/micro-benchmark/python_features/dicts/assign/main.py b/micro-benchmark/python_features/dicts/assign/main.py index 3174c04cd..6a5ea6cb4 100644 --- a/micro-benchmark/python_features/dicts/assign/main.py +++ b/micro-benchmark/python_features/dicts/assign/main.py @@ -14,3 +14,4 @@ def func2(): d["a"] = func2 e = d["a"]() +func1() diff --git a/micro-benchmark/python_features/dicts/nested/main.py b/micro-benchmark/python_features/dicts/nested/main.py index bc0ff8f0d..3ea655a96 100644 --- a/micro-benchmark/python_features/dicts/nested/main.py +++ b/micro-benchmark/python_features/dicts/nested/main.py @@ -14,3 +14,4 @@ def func2(): d["a"]["b"] = func2 e = d["a"]["b"]() +func1() diff --git a/micro-benchmark/python_features/dicts/update/main.py b/micro-benchmark/python_features/dicts/update/main.py index 770057981..94660d072 100644 --- a/micro-benchmark/python_features/dicts/update/main.py +++ b/micro-benchmark/python_features/dicts/update/main.py @@ -13,3 +13,4 @@ def func2(): d.update({"a": func2}) e = d["a"]() +func1() diff --git a/micro-benchmark/python_features/direct_calls/lambda/main_gt.json b/micro-benchmark/python_features/direct_calls/lambda/main_gt.json index bbe6887df..aea18170a 100644 --- a/micro-benchmark/python_features/direct_calls/lambda/main_gt.json +++ b/micro-benchmark/python_features/direct_calls/lambda/main_gt.json @@ -13,7 +13,7 @@ "line_number": 4, "col_offset": 18, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] @@ -23,7 +23,7 @@ "line_number": 4, "col_offset": 36, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] diff --git a/micro-benchmark/python_features/external/attribute/main_gt.json b/micro-benchmark/python_features/external/attribute/main_gt.json index 0d16bea66..040ad43c2 100644 --- a/micro-benchmark/python_features/external/attribute/main_gt.json +++ b/micro-benchmark/python_features/external/attribute/main_gt.json @@ -1,7 +1,7 @@ [ { "file": "main.py", - "line_number": 9, + "line_number": 6, "col_offset": 1, "variable": "a", "type": [ @@ -10,7 +10,7 @@ }, { "file": "main.py", - "line_number": 9, + "line_number": 7, "col_offset": 1, "variable": "b", "type": [ diff --git a/micro-benchmark/python_features/external/cls_parent/main_gt.json b/micro-benchmark/python_features/external/cls_parent/main_gt.json index 190930ffe..5ccebd6cb 100644 --- a/micro-benchmark/python_features/external/cls_parent/main_gt.json +++ b/micro-benchmark/python_features/external/cls_parent/main_gt.json @@ -19,7 +19,7 @@ }, { "file": "main.py", - "line_number": 13, + "line_number": 11, "col_offset": 1, "variable": "b", "type": [ diff --git a/micro-benchmark/python_features/functions/nested/main_gt.json b/micro-benchmark/python_features/functions/nested/main_gt.json index b2c0be4c6..74990988f 100644 --- a/micro-benchmark/python_features/functions/nested/main_gt.json +++ b/micro-benchmark/python_features/functions/nested/main_gt.json @@ -22,7 +22,7 @@ "file": "main.py", "line_number": 7, "col_offset": 9, - "function": "inner", + "function": "outer.inner", "type": [ "int" ] @@ -31,7 +31,8 @@ "file": "main.py", "line_number": 9, "col_offset": 9, - "function": "inner", + "function": "outer.inner", + "variable": "x", "type": [ "int" ] diff --git a/micro-benchmark/python_features/functions/static/main_gt.json b/micro-benchmark/python_features/functions/static/main_gt.json index 87bce8500..af6970a4b 100644 --- a/micro-benchmark/python_features/functions/static/main_gt.json +++ b/micro-benchmark/python_features/functions/static/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 5, + "col_offset": 9, "function": "MyClass.my_static_method", "type": [ "int" diff --git a/micro-benchmark/python_features/generators/iter_param/main_gt.json b/micro-benchmark/python_features/generators/iter_param/main_gt.json index f0bb2118f..a09c103f8 100644 --- a/micro-benchmark/python_features/generators/iter_param/main_gt.json +++ b/micro-benchmark/python_features/generators/iter_param/main_gt.json @@ -82,7 +82,7 @@ "file": "main.py", "line_number": 11, "col_offset": 9, - "variable": "Cls.max", + "variable": "self.max", "function": "Cls.__init__", "type": [ "int" @@ -101,7 +101,7 @@ "file": "main.py", "line_number": 14, "col_offset": 9, - "variable": "Cls.n", + "variable": "self.n", "function": "Cls.__iter__", "type": [ "int" @@ -130,7 +130,7 @@ "file": "main.py", "line_number": 22, "col_offset": 9, - "variable": "Cls.n", + "variable": "self.n", "function": "Cls.__next__", "type": [ "int" diff --git a/micro-benchmark/python_features/generators/iter_return/main_gt.json b/micro-benchmark/python_features/generators/iter_return/main_gt.json index 02fe1fad0..85c019da6 100644 --- a/micro-benchmark/python_features/generators/iter_return/main_gt.json +++ b/micro-benchmark/python_features/generators/iter_return/main_gt.json @@ -22,7 +22,7 @@ "file": "main.py", "line_number": 10, "col_offset": 9, - "variable": "Cls.max", + "variable": "self.max", "function": "Cls.__init__", "type": [ "int" @@ -42,7 +42,7 @@ "line_number": 13, "col_offset": 9, "function": "Cls.__iter__", - "variable": "Cls.n", + "variable": "self.n", "type": [ "int" ] @@ -61,7 +61,7 @@ "line_number": 19, "col_offset": 9, "function": "Cls.__next__", - "variable": "Cls.n", + "variable": "self.n", "type": [ "int" ] diff --git a/micro-benchmark/python_features/generators/iterable/main_gt.json b/micro-benchmark/python_features/generators/iterable/main_gt.json index 2b8e3a16d..808773af6 100644 --- a/micro-benchmark/python_features/generators/iterable/main_gt.json +++ b/micro-benchmark/python_features/generators/iterable/main_gt.json @@ -13,8 +13,8 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "parameter": "func.n", "function": "func.__init__", + "variable": "self.n", "type": [ "int" ] @@ -23,8 +23,8 @@ "file": "main.py", "line_number": 7, "col_offset": 9, - "parameter": "func.num", "function": "func.__init__", + "variable": "self.num", "type": [ "int" ] @@ -44,8 +44,7 @@ "col_offset": 9, "function": "func.__next__", "type": [ - "int", - "Nonetype" + "int" ] }, { @@ -62,7 +61,7 @@ "file": "main.py", "line_number": 14, "col_offset": 18, - "variable": "func.num", + "variable": "self.num", "function": "func.__next__", "type": [ "int" @@ -113,4 +112,4 @@ "int" ] } -] \ No newline at end of file +] diff --git a/micro-benchmark/python_features/generators/iterable_assigned/main_gt.json b/micro-benchmark/python_features/generators/iterable_assigned/main_gt.json index e6e0f6bb0..0ad852a5f 100644 --- a/micro-benchmark/python_features/generators/iterable_assigned/main_gt.json +++ b/micro-benchmark/python_features/generators/iterable_assigned/main_gt.json @@ -13,7 +13,7 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "variable": "Cls.max", + "variable": "self.max", "function": "Cls.__init__", "type": [ "int" @@ -33,7 +33,7 @@ "line_number": 9, "col_offset": 9, "function": "Cls.__iter__", - "variable": "Cls.n", + "variable": "self.n", "type": [ "int" ] @@ -44,8 +44,7 @@ "col_offset": 9, "function": "Cls.__next__", "type": [ - "int", - "Nonetype" + "int" ] }, { @@ -62,7 +61,7 @@ "file": "main.py", "line_number": 17, "col_offset": 9, - "variable": "Cls.n", + "variable": "self.n", "function": "Cls.__next__", "type": [ "int" @@ -122,4 +121,4 @@ "int" ] } -] \ No newline at end of file +] diff --git a/micro-benchmark/python_features/imports/chained_import/main_gt.json b/micro-benchmark/python_features/imports/chained_import/main_gt.json index 9f2aff539..a855c4f98 100644 --- a/micro-benchmark/python_features/imports/chained_import/main_gt.json +++ b/micro-benchmark/python_features/imports/chained_import/main_gt.json @@ -1,8 +1,8 @@ [ { "file": "main.py", - "line_number": 5, - "col_offset": 5, + "line_number": 7, + "col_offset": 1, "variable": "a", "type": [ "str" diff --git a/micro-benchmark/python_features/imports/import_all/main_gt.json b/micro-benchmark/python_features/imports/import_all/main_gt.json index e4bf5519f..e0055a1bd 100644 --- a/micro-benchmark/python_features/imports/import_all/main_gt.json +++ b/micro-benchmark/python_features/imports/import_all/main_gt.json @@ -1,19 +1,16 @@ [ -{ - "file": "main.py", - "line_number": 6, - "col_offset": 1, - "variable": "a", - "type": [ - "int" - ] -}, -{ - "file": "main.py", - "line_number": 7, - "col_offset": 1, - "variable": "b", - "type": [ - "str" - ] -}] + { + "file": "main.py", + "line_number": 6, + "col_offset": 1, + "variable": "a", + "type": ["int"] + }, + { + "file": "main.py", + "line_number": 7, + "col_offset": 1, + "variable": "b", + "type": ["str"] + } +] diff --git a/micro-benchmark/python_features/imports/import_as/main_gt.json b/micro-benchmark/python_features/imports/import_as/main_gt.json index f0c0ab783..6b21e80bf 100644 --- a/micro-benchmark/python_features/imports/import_as/main_gt.json +++ b/micro-benchmark/python_features/imports/import_as/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 7, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "str" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 11, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "str" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "int" diff --git a/micro-benchmark/python_features/imports/import_from/main_gt.json b/micro-benchmark/python_features/imports/import_from/main_gt.json index 2001a7cde..b6a0250ce 100644 --- a/micro-benchmark/python_features/imports/import_from/main_gt.json +++ b/micro-benchmark/python_features/imports/import_from/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "str" diff --git a/micro-benchmark/python_features/imports/init_func_import/main_gt.json b/micro-benchmark/python_features/imports/init_func_import/main_gt.json index 96c19ef0b..93b7a9930 100644 --- a/micro-benchmark/python_features/imports/init_func_import/main_gt.json +++ b/micro-benchmark/python_features/imports/init_func_import/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 7, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "str" diff --git a/micro-benchmark/python_features/imports/init_import/main_gt.json b/micro-benchmark/python_features/imports/init_import/main_gt.json index 2001a7cde..b6a0250ce 100644 --- a/micro-benchmark/python_features/imports/init_import/main_gt.json +++ b/micro-benchmark/python_features/imports/init_import/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "str" diff --git a/micro-benchmark/python_features/imports/parent_import/main_gt.json b/micro-benchmark/python_features/imports/parent_import/main_gt.json index 1bbb0de40..7acb2f27c 100644 --- a/micro-benchmark/python_features/imports/parent_import/main_gt.json +++ b/micro-benchmark/python_features/imports/parent_import/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "str" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 10, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "str" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 11, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "float" @@ -29,7 +29,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": [ "int" diff --git a/micro-benchmark/python_features/imports/relative_import/main.py b/micro-benchmark/python_features/imports/relative_import/main.py index 3f9e25a1f..e175deaf0 100644 --- a/micro-benchmark/python_features/imports/relative_import/main.py +++ b/micro-benchmark/python_features/imports/relative_import/main.py @@ -10,3 +10,4 @@ def func(): a = nested.to_import.func() +func() diff --git a/micro-benchmark/python_features/imports/relative_import/main_gt.json b/micro-benchmark/python_features/imports/relative_import/main_gt.json index 335aba749..dc90fb528 100644 --- a/micro-benchmark/python_features/imports/relative_import/main_gt.json +++ b/micro-benchmark/python_features/imports/relative_import/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "str" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" diff --git a/micro-benchmark/python_features/imports/relative_import_with_name/main_gt.json b/micro-benchmark/python_features/imports/relative_import_with_name/main_gt.json index 2001a7cde..b6a0250ce 100644 --- a/micro-benchmark/python_features/imports/relative_import_with_name/main_gt.json +++ b/micro-benchmark/python_features/imports/relative_import_with_name/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "str" diff --git a/micro-benchmark/python_features/imports/simple_import/main_gt.json b/micro-benchmark/python_features/imports/simple_import/main_gt.json index d52319b90..d9dc2619b 100644 --- a/micro-benchmark/python_features/imports/simple_import/main_gt.json +++ b/micro-benchmark/python_features/imports/simple_import/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" diff --git a/micro-benchmark/python_features/imports/submodule_import/main_gt.json b/micro-benchmark/python_features/imports/submodule_import/main_gt.json index 66e719fed..9fc2c94e0 100644 --- a/micro-benchmark/python_features/imports/submodule_import/main_gt.json +++ b/micro-benchmark/python_features/imports/submodule_import/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 9, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "float" diff --git a/micro-benchmark/python_features/imports/submodule_import_all/main_gt.json b/micro-benchmark/python_features/imports/submodule_import_all/main_gt.json index 96c19ef0b..93b7a9930 100644 --- a/micro-benchmark/python_features/imports/submodule_import_all/main_gt.json +++ b/micro-benchmark/python_features/imports/submodule_import_all/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 7, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "str" diff --git a/micro-benchmark/python_features/imports/submodule_import_as/main_gt.json b/micro-benchmark/python_features/imports/submodule_import_as/main_gt.json index d52319b90..d9dc2619b 100644 --- a/micro-benchmark/python_features/imports/submodule_import_as/main_gt.json +++ b/micro-benchmark/python_features/imports/submodule_import_as/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" diff --git a/micro-benchmark/python_features/imports/submodule_import_from/main_gt.json b/micro-benchmark/python_features/imports/submodule_import_from/main_gt.json index 96c19ef0b..93b7a9930 100644 --- a/micro-benchmark/python_features/imports/submodule_import_from/main_gt.json +++ b/micro-benchmark/python_features/imports/submodule_import_from/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 7, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "str" diff --git a/micro-benchmark/python_features/kwargs/assigned_call/main_gt.json b/micro-benchmark/python_features/kwargs/assigned_call/main_gt.json index 495a26c94..8cc50675e 100644 --- a/micro-benchmark/python_features/kwargs/assigned_call/main_gt.json +++ b/micro-benchmark/python_features/kwargs/assigned_call/main_gt.json @@ -2,21 +2,21 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": ["str"] }, { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": ["str"] }, { "file": "main.py", "line_number": 8, - "col_offset": 10, + "col_offset": 10, "function": "func", "parameter": "a", "type": ["callable"] @@ -24,21 +24,21 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": ["callable"] }, { "file": "main.py", "line_number": 13, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": ["callable"] }, { "file": "main.py", "line_number": 14, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": ["str"] } diff --git a/micro-benchmark/python_features/kwargs/call/main_gt.json b/micro-benchmark/python_features/kwargs/call/main_gt.json index 54df453d8..d067c3154 100644 --- a/micro-benchmark/python_features/kwargs/call/main_gt.json +++ b/micro-benchmark/python_features/kwargs/call/main_gt.json @@ -2,21 +2,21 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func1", "type": ["str"] }, { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": ["str"] }, { "file": "main.py", "line_number": 8, - "col_offset": 10, + "col_offset": 10, "function": "func", "parameter": "a", "type": ["callable"] @@ -24,7 +24,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": ["str"] } diff --git a/micro-benchmark/python_features/kwargs/chained_call/main_gt.json b/micro-benchmark/python_features/kwargs/chained_call/main_gt.json index 3ca7e6202..560539608 100644 --- a/micro-benchmark/python_features/kwargs/chained_call/main_gt.json +++ b/micro-benchmark/python_features/kwargs/chained_call/main_gt.json @@ -2,21 +2,21 @@ { "file": "main.py", "line_number": 5, - "col_offset": 5, + "col_offset": 5, "function": "func3", "type": ["str"] }, { "file": "main.py", "line_number": 9, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": ["str"] }, { "file": "main.py", "line_number": 9, - "col_offset": 11, + "col_offset": 11, "function": "func2", "parameter": "a", "type": ["callable"] @@ -24,14 +24,14 @@ { "file": "main.py", "line_number": 13, - "col_offset": 5, + "col_offset": 5, "function": "func1", "type": ["str"] }, { "file": "main.py", "line_number": 13, - "col_offset": 11, + "col_offset": 11, "function": "func1", "parameter": "a", "type": ["callable"] @@ -39,7 +39,7 @@ { "file": "main.py", "line_number": 13, - "col_offset": 14, + "col_offset": 14, "function": "func1", "parameter": "b", "type": ["callable"] @@ -47,7 +47,7 @@ { "file": "main.py", "line_number": 17, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": ["str"] } diff --git a/micro-benchmark/python_features/kwargs/multiple/main_gt.json b/micro-benchmark/python_features/kwargs/multiple/main_gt.json index 20bea08b2..08640d199 100644 --- a/micro-benchmark/python_features/kwargs/multiple/main_gt.json +++ b/micro-benchmark/python_features/kwargs/multiple/main_gt.json @@ -2,14 +2,14 @@ { "file": "main.py", "line_number": 4, - "col_offset": 1, + "col_offset": 5, "function": "concatenate", "type": ["str"] }, { "file": "main.py", "line_number": 4, - "col_offset": 17, + "col_offset": 19, "function": "concatenate", "parameter": "kwargs", "type": ["dict"] @@ -17,8 +17,9 @@ { "file": "main.py", "line_number": 5, - "col_offset": 5, + "col_offset": 5, "variable": "result", + "function": "concatenate", "type": ["str"] }, { @@ -26,12 +27,13 @@ "line_number": 6, "col_offset": 9, "variable": "arg", + "function": "concatenate", "type": ["str"] }, { "file": "main.py", "line_number": 11, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": ["str"] } diff --git a/micro-benchmark/python_features/lambdas/call/main_gt.json b/micro-benchmark/python_features/lambdas/call/main_gt.json index f03087969..e71d0f34e 100644 --- a/micro-benchmark/python_features/lambdas/call/main_gt.json +++ b/micro-benchmark/python_features/lambdas/call/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 1, + "col_offset": 1, "variable": "x", "type": [ "callable" @@ -11,9 +11,9 @@ { "file": "main.py", "line_number": 4, - "col_offset": 12, + "col_offset": 12, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] @@ -21,7 +21,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" diff --git a/micro-benchmark/python_features/lambdas/calls_parameter/main_gt.json b/micro-benchmark/python_features/lambdas/calls_parameter/main_gt.json index a56db3d72..cb26176bd 100644 --- a/micro-benchmark/python_features/lambdas/calls_parameter/main_gt.json +++ b/micro-benchmark/python_features/lambdas/calls_parameter/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func1", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": [ "str" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "x", "type": [ "callable" @@ -29,9 +29,9 @@ { "file": "main.py", "line_number": 12, - "col_offset": 12, + "col_offset": 12, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "callable" ] @@ -39,7 +39,7 @@ { "file": "main.py", "line_number": 14, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" @@ -48,7 +48,7 @@ { "file": "main.py", "line_number": 16, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "str" diff --git a/micro-benchmark/python_features/lambdas/chained_calls/main_gt.json b/micro-benchmark/python_features/lambdas/chained_calls/main_gt.json index 8af1aa2fb..a16f4056f 100644 --- a/micro-benchmark/python_features/lambdas/chained_calls/main_gt.json +++ b/micro-benchmark/python_features/lambdas/chained_calls/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func3", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 11, + "col_offset": 11, "parameter": "a", "function": "func3", "type": [ @@ -21,7 +21,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": [ "int" @@ -30,7 +30,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 11, + "col_offset": 11, "parameter": "a", "function": "func2", "type": [ @@ -40,7 +40,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 14, + "col_offset": 14, "parameter": "b", "function": "func2", "type": [ @@ -50,7 +50,7 @@ { "file": "main.py", "line_number": 13, - "col_offset": 5, + "col_offset": 5, "function": "func1", "type": [ "int" @@ -59,7 +59,7 @@ { "file": "main.py", "line_number": 13, - "col_offset": 11, + "col_offset": 11, "parameter": "a", "function": "func1", "type": [ @@ -69,7 +69,7 @@ { "file": "main.py", "line_number": 13, - "col_offset": 14, + "col_offset": 14, "parameter": "b", "function": "func1", "type": [ @@ -79,7 +79,7 @@ { "file": "main.py", "line_number": 13, - "col_offset": 17, + "col_offset": 17, "parameter": "c", "function": "func1", "type": [ @@ -89,7 +89,7 @@ { "file": "main.py", "line_number": 18, - "col_offset": 1, + "col_offset": 1, "variable": "d", "type": [ "int" @@ -98,9 +98,9 @@ { "file": "main.py", "line_number": 18, - "col_offset": 18, + "col_offset": 18, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] @@ -108,9 +108,9 @@ { "file": "main.py", "line_number": 18, - "col_offset": 35, + "col_offset": 35, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] @@ -118,9 +118,9 @@ { "file": "main.py", "line_number": 18, - "col_offset": 52, + "col_offset": 52, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] diff --git a/micro-benchmark/python_features/lambdas/composition/main_gt.json b/micro-benchmark/python_features/lambdas/composition/main_gt.json index d9a75445c..aea18170a 100644 --- a/micro-benchmark/python_features/lambdas/composition/main_gt.json +++ b/micro-benchmark/python_features/lambdas/composition/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 1, + "col_offset": 1, "variable": "result", "type": [ "int" @@ -11,9 +11,9 @@ { "file": "main.py", "line_number": 4, - "col_offset": 18, + "col_offset": 18, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] @@ -21,9 +21,9 @@ { "file": "main.py", "line_number": 4, - "col_offset": 36, + "col_offset": 36, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] diff --git a/micro-benchmark/python_features/lambdas/parameter_call/main_gt.json b/micro-benchmark/python_features/lambdas/parameter_call/main_gt.json index f1c7a2ce4..eff386565 100644 --- a/micro-benchmark/python_features/lambdas/parameter_call/main_gt.json +++ b/micro-benchmark/python_features/lambdas/parameter_call/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 10, + "col_offset": 10, "parameter": "a", "function": "func", "type": [ @@ -21,7 +21,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 1, + "col_offset": 1, "variable": "y", "type": [ "callable" @@ -30,9 +30,9 @@ { "file": "main.py", "line_number": 8, - "col_offset": 12, + "col_offset": 12, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] @@ -40,7 +40,7 @@ { "file": "main.py", "line_number": 10, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "int" diff --git a/micro-benchmark/python_features/lambdas/return_call/main_gt.json b/micro-benchmark/python_features/lambdas/return_call/main_gt.json index 9e6d9fed2..20e63562c 100644 --- a/micro-benchmark/python_features/lambdas/return_call/main_gt.json +++ b/micro-benchmark/python_features/lambdas/return_call/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "callable" @@ -11,9 +11,9 @@ { "file": "main.py", "line_number": 5, - "col_offset": 19, + "col_offset": 19, "function": "lambda", - "variable": "x", + "parameter": "x", "type": [ "int" ] @@ -21,7 +21,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 1, + "col_offset": 1, "variable": "y", "type": [ "callable" @@ -30,7 +30,7 @@ { "file": "main.py", "line_number": 9, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" diff --git a/micro-benchmark/python_features/lists/comprehension_if/main_gt.json b/micro-benchmark/python_features/lists/comprehension_if/main_gt.json index 5b8df4ab7..3d549fa78 100644 --- a/micro-benchmark/python_features/lists/comprehension_if/main_gt.json +++ b/micro-benchmark/python_features/lists/comprehension_if/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "bool" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "list" diff --git a/micro-benchmark/python_features/lists/comprehension_val/main_gt.json b/micro-benchmark/python_features/lists/comprehension_val/main_gt.json index 42dc9e028..53f1c78d0 100644 --- a/micro-benchmark/python_features/lists/comprehension_val/main_gt.json +++ b/micro-benchmark/python_features/lists/comprehension_val/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 10, + "col_offset": 10, "parameter": "a", "function": "func", "type": [ @@ -21,7 +21,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 1, + "col_offset": 1, "variable": "ls", "type": [ "list" @@ -30,7 +30,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 19, + "col_offset": 19, "variable": "a", "type": [ "int" diff --git a/micro-benchmark/python_features/lists/copy/main_gt.json b/micro-benchmark/python_features/lists/copy/main_gt.json index ded9878d8..2e3291cf8 100644 --- a/micro-benchmark/python_features/lists/copy/main_gt.json +++ b/micro-benchmark/python_features/lists/copy/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 2, - "col_offset": 1, + "col_offset": 1, "variable": "my_list", "type": [ "list" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 3, - "col_offset": 1, + "col_offset": 1, "variable": "copy_of_my_list", "type": [ "list" diff --git a/micro-benchmark/python_features/lists/ext_index/main.py b/micro-benchmark/python_features/lists/ext_index/main.py index 172adff80..cf39cec57 100644 --- a/micro-benchmark/python_features/lists/ext_index/main.py +++ b/micro-benchmark/python_features/lists/ext_index/main.py @@ -15,3 +15,4 @@ def func2(): ls = [func1, func2] a = ls[key]() +func1() diff --git a/micro-benchmark/python_features/lists/ext_index/main_gt.json b/micro-benchmark/python_features/lists/ext_index/main_gt.json index 33419f188..2be227b00 100644 --- a/micro-benchmark/python_features/lists/ext_index/main_gt.json +++ b/micro-benchmark/python_features/lists/ext_index/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 7, - "col_offset": 5, + "col_offset": 5, "function": "func1", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 11, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": [ "str" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 15, - "col_offset": 1, + "col_offset": 1, "variable": "ls", "type": [ "list" @@ -29,7 +29,7 @@ { "file": "main.py", "line_number": 17, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "str" diff --git a/micro-benchmark/python_features/lists/nested/main.py b/micro-benchmark/python_features/lists/nested/main.py index de0e44a83..eba88d7af 100644 --- a/micro-benchmark/python_features/lists/nested/main.py +++ b/micro-benchmark/python_features/lists/nested/main.py @@ -14,3 +14,4 @@ def func2(): a = ls[0] b = a[0] c = b() +func2() diff --git a/micro-benchmark/python_features/lists/nested/main_gt.json b/micro-benchmark/python_features/lists/nested/main_gt.json index 7bba11fcd..10fb459f8 100644 --- a/micro-benchmark/python_features/lists/nested/main_gt.json +++ b/micro-benchmark/python_features/lists/nested/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func1", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": [ "str" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "ls", "type": [ "list" @@ -29,7 +29,7 @@ { "file": "main.py", "line_number": 14, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "list" @@ -38,7 +38,7 @@ { "file": "main.py", "line_number": 15, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "callable" @@ -47,7 +47,7 @@ { "file": "main.py", "line_number": 16, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": [ "int" diff --git a/micro-benchmark/python_features/lists/nested_comprehension/main_gt.json b/micro-benchmark/python_features/lists/nested_comprehension/main_gt.json index 04fae04f2..3272f0b54 100644 --- a/micro-benchmark/python_features/lists/nested_comprehension/main_gt.json +++ b/micro-benchmark/python_features/lists/nested_comprehension/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func1", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 11, + "col_offset": 11, "parameter": "a", "function": "func1", "type": [ @@ -21,7 +21,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": [ "int" @@ -30,7 +30,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 11, + "col_offset": 11, "parameter": "a", "function": "func2", "type": [ @@ -40,7 +40,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": [ "list" @@ -49,7 +49,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 19, + "col_offset": 19, "variable": "a", "type": [ "int" @@ -58,7 +58,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 38, + "col_offset": 38, "variable": "b", "type": [ "int" diff --git a/micro-benchmark/python_features/lists/slice/main.py b/micro-benchmark/python_features/lists/slice/main.py index 815ccf7d3..cf937f833 100644 --- a/micro-benchmark/python_features/lists/slice/main.py +++ b/micro-benchmark/python_features/lists/slice/main.py @@ -18,3 +18,4 @@ def func3(): ls2 = ls[1:3] c = ls2[0]() +func1(); func3() diff --git a/micro-benchmark/python_features/lists/slice/main_gt.json b/micro-benchmark/python_features/lists/slice/main_gt.json index 24acc3fc2..f73e48df4 100644 --- a/micro-benchmark/python_features/lists/slice/main_gt.json +++ b/micro-benchmark/python_features/lists/slice/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func1", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": [ "float" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 5, + "col_offset": 5, "function": "func3", "type": [ "str" @@ -29,7 +29,7 @@ { "file": "main.py", "line_number": 16, - "col_offset": 1, + "col_offset": 1, "variable": "ls", "type": [ "list" @@ -38,7 +38,7 @@ { "file": "main.py", "line_number": 16, - "col_offset": 1, + "col_offset": 1, "variable": "ls[0]", "type": [ "callable" @@ -47,7 +47,7 @@ { "file": "main.py", "line_number": 16, - "col_offset": 1, + "col_offset": 1, "variable": "ls[1]", "type": [ "callable" @@ -56,7 +56,7 @@ { "file": "main.py", "line_number": 16, - "col_offset": 1, + "col_offset": 1, "variable": "ls[2]", "type": [ "callable" @@ -65,7 +65,7 @@ { "file": "main.py", "line_number": 18, - "col_offset": 1, + "col_offset": 1, "variable": "ls2", "type": [ "list" @@ -74,7 +74,7 @@ { "file": "main.py", "line_number": 18, - "col_offset": 1, + "col_offset": 1, "variable": "ls2[0]", "type": [ "callable" @@ -83,7 +83,7 @@ { "file": "main.py", "line_number": 18, - "col_offset": 1, + "col_offset": 1, "variable": "ls2[1]", "type": [ "callable" @@ -92,7 +92,7 @@ { "file": "main.py", "line_number": 20, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": [ "float" diff --git a/micro-benchmark/python_features/lists/unpacking/main_gt.json b/micro-benchmark/python_features/lists/unpacking/main_gt.json index 4e959ba92..1c273b2cc 100644 --- a/micro-benchmark/python_features/lists/unpacking/main_gt.json +++ b/micro-benchmark/python_features/lists/unpacking/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 2, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "list" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 3, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "int" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 3, - "col_offset": 4, + "col_offset": 4, "variable": "c", "type": [ "float" @@ -29,7 +29,7 @@ { "file": "main.py", "line_number": 3, - "col_offset": 7, + "col_offset": 7, "variable": "d", "type": [ "str" diff --git a/micro-benchmark/python_features/mro/basic/main_gt.json b/micro-benchmark/python_features/mro/basic/main_gt.json index ee00ca441..64ce67808 100644 --- a/micro-benchmark/python_features/mro/basic/main_gt.json +++ b/micro-benchmark/python_features/mro/basic/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 5, - "col_offset": 9, + "col_offset": 9, "function": "A.func", "type": [ "int" @@ -12,7 +12,7 @@ "file": "main.py", "line_number": 13, "variable": "b", - "col_offset": 1, + "col_offset": 1, "type": [ "B" ] @@ -21,7 +21,7 @@ "file": "main.py", "line_number": 14, "variable": "c", - "col_offset": 1, + "col_offset": 1, "type": [ "int" ] diff --git a/micro-benchmark/python_features/mro/basic_init/main_gt.json b/micro-benchmark/python_features/mro/basic_init/main_gt.json index 26fd2819b..45c199778 100644 --- a/micro-benchmark/python_features/mro/basic_init/main_gt.json +++ b/micro-benchmark/python_features/mro/basic_init/main_gt.json @@ -2,9 +2,9 @@ { "file": "main.py", "line_number": 7, - "col_offset": 9, + "col_offset": 9, "function": "A.__init__", - "variable": "A.a", + "variable": "self.a", "type": [ "int" ] @@ -12,7 +12,7 @@ { "file": "main.py", "line_number": 11, - "col_offset": 9, + "col_offset": 9, "function": "B.func", "type": [ "int" diff --git a/micro-benchmark/python_features/mro/parents_same_superclass/main.py b/micro-benchmark/python_features/mro/parents_same_superclass/main.py index 144ab8d89..13546b750 100644 --- a/micro-benchmark/python_features/mro/parents_same_superclass/main.py +++ b/micro-benchmark/python_features/mro/parents_same_superclass/main.py @@ -27,3 +27,4 @@ class D(B, C): d = D() e = d.func() +A().func() diff --git a/micro-benchmark/python_features/mro/self_assignment/main.py b/micro-benchmark/python_features/mro/self_assignment/main.py index 187bffb62..f906458c5 100644 --- a/micro-benchmark/python_features/mro/self_assignment/main.py +++ b/micro-benchmark/python_features/mro/self_assignment/main.py @@ -23,3 +23,5 @@ def func(self): a.funca() b = a.smth() + +B().func() diff --git a/micro-benchmark/python_features/mro/self_assignment/main_gt.json b/micro-benchmark/python_features/mro/self_assignment/main_gt.json index c8a6f0a82..085a436e6 100644 --- a/micro-benchmark/python_features/mro/self_assignment/main_gt.json +++ b/micro-benchmark/python_features/mro/self_assignment/main_gt.json @@ -13,7 +13,7 @@ "line_number": 6, "col_offset": 9, "function": "B.funcb", - "variable": "B.smth", + "variable": "self.smth", "type": [ "callable" ] @@ -41,7 +41,7 @@ "line_number": 14, "col_offset": 9, "function": "A.funca", - "variable": "A.smth", + "variable": "self.smth", "type": [ "callable" ] diff --git a/micro-benchmark/python_features/mro/two_parents/main.py b/micro-benchmark/python_features/mro/two_parents/main.py index 0322c0fe7..59fc50ad0 100644 --- a/micro-benchmark/python_features/mro/two_parents/main.py +++ b/micro-benchmark/python_features/mro/two_parents/main.py @@ -20,3 +20,4 @@ class C(A, B): c = C() d = c.func() +B().func() diff --git a/micro-benchmark/python_features/mro/two_parents_method_defined/main.py b/micro-benchmark/python_features/mro/two_parents_method_defined/main.py index ecad91890..dddddb354 100644 --- a/micro-benchmark/python_features/mro/two_parents_method_defined/main.py +++ b/micro-benchmark/python_features/mro/two_parents_method_defined/main.py @@ -24,3 +24,4 @@ def func(self): c = C() d = c.func() +A().func(); B().func() diff --git a/micro-benchmark/python_features/mro/two_parents_method_defined/main_gt.json b/micro-benchmark/python_features/mro/two_parents_method_defined/main_gt.json index 89d42f6b9..b4b3d6752 100644 --- a/micro-benchmark/python_features/mro/two_parents_method_defined/main_gt.json +++ b/micro-benchmark/python_features/mro/two_parents_method_defined/main_gt.json @@ -30,7 +30,7 @@ "file": "main.py", "line_number": 25, "col_offset": 1, - "variable": "C", + "variable": "c", "type": [ "str" ] diff --git a/micro-benchmark/python_features/returns/call/main_gt.json b/micro-benchmark/python_features/returns/call/main_gt.json index b1eb0d3e0..b7963d5e8 100644 --- a/micro-benchmark/python_features/returns/call/main_gt.json +++ b/micro-benchmark/python_features/returns/call/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "return_func", "type": [ "str" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "callable" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "callable" @@ -29,7 +29,7 @@ { "file": "main.py", "line_number": 13, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "str" diff --git a/micro-benchmark/python_features/returns/imported_call/main_gt.json b/micro-benchmark/python_features/returns/imported_call/main_gt.json index 5c320e738..e9e8efad4 100644 --- a/micro-benchmark/python_features/returns/imported_call/main_gt.json +++ b/micro-benchmark/python_features/returns/imported_call/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "callable" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 7, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "str" diff --git a/micro-benchmark/python_features/returns/multiple_types/main_gt.json b/micro-benchmark/python_features/returns/multiple_types/main_gt.json index eb77b2bb2..4a94f1412 100644 --- a/micro-benchmark/python_features/returns/multiple_types/main_gt.json +++ b/micro-benchmark/python_features/returns/multiple_types/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "str", @@ -13,7 +13,7 @@ "file": "main.py", "line_number": 4, "parameter": "x", - "col_offset": 10, + "col_offset": 10, "function": "func", "type": [ "int" @@ -22,7 +22,7 @@ { "file": "main.py", "line_number": 11, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" @@ -31,7 +31,7 @@ { "file": "main.py", "line_number": 12, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "str" diff --git a/micro-benchmark/python_features/returns/nested_import_call/main_gt.json b/micro-benchmark/python_features/returns/nested_import_call/main_gt.json index accdaa3f3..e9e8efad4 100644 --- a/micro-benchmark/python_features/returns/nested_import_call/main_gt.json +++ b/micro-benchmark/python_features/returns/nested_import_call/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 6, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "callable" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 7, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "str" diff --git a/micro-benchmark/python_features/returns/object/main_gt.json b/micro-benchmark/python_features/returns/object/main_gt.json index f7fbb35bf..199905fa3 100644 --- a/micro-benchmark/python_features/returns/object/main_gt.json +++ b/micro-benchmark/python_features/returns/object/main_gt.json @@ -23,7 +23,7 @@ "file": "main.py", "line_number": 6, "col_offset": 9, - "variable": "Person.name", + "variable": "self.name", "function": "Person.__init__", "type": [ "str" @@ -33,8 +33,8 @@ "file": "main.py", "line_number": 7, "col_offset": 9, - "parameter": "Person.age", "function": "Person.__init__", + "variable": "self.age", "type": [ "int" ] diff --git a/micro-benchmark/python_features/returns/return_complex/main_gt.json b/micro-benchmark/python_features/returns/return_complex/main_gt.json index 6dd1b3fb0..c31a4a188 100644 --- a/micro-benchmark/python_features/returns/return_complex/main_gt.json +++ b/micro-benchmark/python_features/returns/return_complex/main_gt.json @@ -2,7 +2,7 @@ { "file": "main.py", "line_number": 4, - "col_offset": 5, + "col_offset": 5, "function": "func", "type": [ "int" @@ -11,7 +11,7 @@ { "file": "main.py", "line_number": 8, - "col_offset": 1, + "col_offset": 1, "variable": "a", "type": [ "int" @@ -20,7 +20,7 @@ { "file": "main.py", "line_number": 11, - "col_offset": 5, + "col_offset": 5, "function": "func2", "type": [ "int" @@ -29,7 +29,7 @@ { "file": "main.py", "line_number": 15, - "col_offset": 5, + "col_offset": 5, "function": "func3", "type": [ "callable" @@ -38,7 +38,7 @@ { "file": "main.py", "line_number": 19, - "col_offset": 5, + "col_offset": 5, "function": "func4", "type": [ "callable" @@ -47,7 +47,7 @@ { "file": "main.py", "line_number": 23, - "col_offset": 1, + "col_offset": 1, "variable": "b", "type": [ "int" @@ -56,7 +56,7 @@ { "file": "main.py", "line_number": 26, - "col_offset": 5, + "col_offset": 5, "function": "func5", "type": [ "int" @@ -65,7 +65,7 @@ { "file": "main.py", "line_number": 30, - "col_offset": 1, + "col_offset": 1, "variable": "c", "type": [ "int" diff --git a/micro-benchmark/python_features/returns/return_lambda/main_gt.json b/micro-benchmark/python_features/returns/return_lambda/main_gt.json index e90349f31..69b7f619c 100644 --- a/micro-benchmark/python_features/returns/return_lambda/main_gt.json +++ b/micro-benchmark/python_features/returns/return_lambda/main_gt.json @@ -12,8 +12,8 @@ "file": "main.py", "line_number": 5, "col_offset": 19, - "function": "func", - "variable": "x", + "function": "lambda", + "parameter": "x", "type": [ "int", "float" diff --git a/micro-benchmark/python_features/returns/return_types/main.py b/micro-benchmark/python_features/returns/return_types/main.py index 90b1808e9..8af01227a 100644 --- a/micro-benchmark/python_features/returns/return_types/main.py +++ b/micro-benchmark/python_features/returns/return_types/main.py @@ -18,13 +18,13 @@ def func1(): from collections import namedtuple - # return_namedtuple +Point = namedtuple("Point", ["x", "y"]) def func3(): - Point = namedtuple("Point", ["x", "y"]) return Point(1, 2) + c = func3() diff --git a/micro-benchmark/python_features/returns/return_types/main_gt.json b/micro-benchmark/python_features/returns/return_types/main_gt.json index 9654a3680..0834b1209 100644 --- a/micro-benchmark/python_features/returns/return_types/main_gt.json +++ b/micro-benchmark/python_features/returns/return_types/main_gt.json @@ -46,9 +46,8 @@ }, { "file": "main.py", - "line_number": 24, - "col_offset": 5, - "function": "func3", + "line_number": 22, + "col_offset": 1, "variable": "Point", "type": [ "type" diff --git a/src/main_analyze_results.py b/src/main_analyze_results.py index 141c858aa..51f48b58a 100644 --- a/src/main_analyze_results.py +++ b/src/main_analyze_results.py @@ -93,11 +93,7 @@ def compare_json_files(expected, out): # for _type in fact_expected.get("type", []): # if _type in fact_out.get("type", []): # partial_matches += 1 - elif all( - x in fact_out and fact_out[x] == fact_expected[x] - for x in fact_expected.keys() - if x not in ["type", "col_offset"] - ): + elif utils.is_same_element(fact_out, fact_expected): entry_match = True break else: @@ -131,7 +127,8 @@ def format_missing_matches(all_missing_matches): "File", "Line Number", "Function", - "Parameter/Variable", + "Parameter", + "Variable", "Actual Type", "Predicted Type", ] @@ -193,7 +190,7 @@ def format_missing_matches(all_missing_matches): ] formatted_output = ( "\nMissing matches:\n{}\nTotal error entries: {}\nErrors in function return" - " type: {}\nErrors in param: {}\n/Errors in variables:{}\nMissing entries:" + " type: {}\nErrors in param: {}\nErrors in variables: {}\nMissing entries:" " {}\nMismatch entries: {}".format( missing_matches_table, total_missing_entries, @@ -1048,14 +1045,16 @@ def run_results_analyzer(results_dir, benchmark_dir="micro-benchmark"): ) for tool in list(tools_results.keys()): - shutil.move( - f"{tool}_mismatches_reasons.csv", - f"{str(results_dir)}/mismatches/{tool}_mismatches_reasons.csv", - ) - shutil.move( - f"{tool}_not_found_reasons.csv", - f"{str(results_dir)}/missing/{tool}_not_found_reasons.csv", - ) + if Path(f"{tool}_mismatches_reasons.csv").exists(): + shutil.move( + f"{tool}_mismatches_reasons.csv", + f"{str(results_dir)}/mismatches/{tool}_mismatches_reasons.csv", + ) + if Path(f"{tool}_not_found_reasons.csv").exists(): + shutil.move( + f"{tool}_not_found_reasons.csv", + f"{str(results_dir)}/missing/{tool}_not_found_reasons.csv", + ) if tool in utils.ML_TOOLS: shutil.move( diff --git a/src/result_analyzer/analysis_utils.py b/src/result_analyzer/analysis_utils.py index 4571512d2..9d9990e41 100644 --- a/src/result_analyzer/analysis_utils.py +++ b/src/result_analyzer/analysis_utils.py @@ -170,6 +170,19 @@ def transform_type_string(s: str) -> str: return s +def is_same_element( + a: dict[str, int|str|list[str]], + b: dict[str, int|str|list[str]] +) -> bool: + """Decides whether the two entries refer to the same program element + (function return value, function parameter or variable).""" + return all( + a.get(k) == b.get(k) + # really, just file/line/column should be enough + for k in ('file', 'line_number', 'col_offset', 'function', 'parameter', 'variable') + ) + + def check_match( expected, out, @@ -179,46 +192,9 @@ def check_match( print_mismatch=False, metadata={}, ): - if not all( - [ - x in expected - for x in out.keys() - if x not in ["type", "all_type_preds", "col_offset"] - ] - ): - return False - - # check if file match - if expected.get("file") != out.get("file"): - return False - - # # check if line_number match - if expected.get("line_number") != out.get("line_number"): - return False - - # if "col_offset" in expected and "col_offset" in out: - if expected["col_offset"] != out["col_offset"]: + if not is_same_element(expected, out): return False - if "col_offset" in expected and "col_offset" in out: - if expected["col_offset"] != out["col_offset"]: - return False - - # check if function match - if "function" in expected: - if expected.get("function") != out.get("function"): - return False - - # Check if parameters match - if "parameter" in expected: - if expected.get("parameter") != out.get("parameter"): - return False - - # Check if variable match - if "variable" in expected: - if expected.get("variable") != out.get("variable"): - return False - # logger.debug("Other facts match: checking for types") type_formatted = [] # check if type match @@ -252,7 +228,7 @@ def check_match( # print only full mismatch if print_mismatch: logger.debug( - f"\n\n##### Type mismatch! #####\nPartial mactching: {partial_match}" + f"\n\n##### Type mismatch! #####\nPartial matching: {partial_match}" ) with open(f"{metadata['tool_name']}_mismatches_reasons.csv", "a") as f: diff --git a/src/runner_class.py b/src/runner_class.py index ffdd5c166..9ba20991f 100644 --- a/src/runner_class.py +++ b/src/runner_class.py @@ -45,14 +45,28 @@ def __init__( os.makedirs(self.host_results_path) def _build_docker_image(self): + from docker.errors import BuildError + logger.info("Building image") - image, _ = self.docker_client.images.build( - path=self.dockerfile_path, - tag=self.tool_name, - dockerfile=self.dockerfile_name, - nocache=self.nocache, - ) - return image + try: + image, logs = self.docker_client.images.build( + path=self.dockerfile_path, + tag=self.tool_name, + dockerfile=self.dockerfile_name, + nocache=self.nocache, + ) + for chunk in logs: + if 'stream' in chunk: + print(chunk['stream'], end='') + + return image + except BuildError as e: + for chunk in e.build_log or []: + if 'stream' in chunk: + print(chunk['stream'], end='') + elif 'errorDetail' in chunk: + print(chunk['errorDetail'].get('message', '')) + raise def spawn_docker_instance(self): logger.info("Creating container") diff --git a/src/target_tools/real-world-llms/README.md b/src/target_tools/real-world-llms/README.md index 260962315..67c2c80fa 100644 --- a/src/target_tools/real-world-llms/README.md +++ b/src/target_tools/real-world-llms/README.md @@ -1,7 +1,7 @@ # 🧠 TypeEvalPy: Type Inference Evaluation for Python This adapter provides tools for: -- Preprocessing the [ManyTypes4Py](https://github.com/saltudelft/many-types-4-py) dataset +- Preprocessing the [ManyTypes4Py](https://github.com/saltudelft/many-types-4-py-dataset) dataset - Running type inference using large language models (LLMs) - Analyzing and evaluating results on real-world Python benchmarks @@ -9,7 +9,7 @@ This adapter provides tools for: ## 📦 1. Data Preprocessing -Start by downloading and preparing the [ManyTypes4Py](https://github.com/saltudelft/many-types-4-py) dataset. +Start by downloading and preparing the [ManyTypes4Py](https://github.com/saltudelft/many-types-4-py-dataset) dataset. ### Steps: @@ -53,4 +53,4 @@ After inference is complete, go to result_analyzer module and evaluate the predi python3 large_scale_analysis.py ``` -This will generate ```analysis.txt``` in the model results. \ No newline at end of file +This will generate ```analysis.txt``` in the model results. diff --git a/src/test_match.py b/src/test_match.py new file mode 100644 index 000000000..b12d15692 --- /dev/null +++ b/src/test_match.py @@ -0,0 +1,99 @@ +from main_analyze_results import compare_json_files +import json + + +def test_missing_matches(tmp_path): + expected = tmp_path / "main_gt.json" + expected.write_text("""\ +[ + { + "file": "main.py", + "line_number": 3, + "col_offset": 5, + "function": "param_func", + "type": [ + "str" + ] + }, + { + "file": "main.py", + "line_number": 7, + "col_offset": 5, + "function": "func", + "type": [ + "str" + ] + }, + { + "file": "main.py", + "line_number": 7, + "col_offset": 10, + "function": "func", + "parameter": "a", + "type": [ + "callable" + ] + }, + { + "file": "main.py", + "line_number": 11, + "col_offset": 1, + "variable": "b", + "type": [ + "str" + ] + } +] + """) + + output = tmp_path / "main_results.json" + output.write_text("""\ +[ + { + "file": "main.py", + "line_number": 3, + "col_offset": 5, + "function": "param_func", + "type": [ + "str" + ] + }, + { + "file": "main.py", + "line_number": 7, + "col_offset": 10, + "function": "func", + "parameter": "a", + "type": [ + "callable" + ] + }, + { + "file": "main.py", + "line_number": 7, + "col_offset": 5, + "function": "func", + "type": [ + "str" + ] + } +] + """) + + results = compare_json_files(expected, output) + print(results) + + assert len(results['missing_matches']) == 1 + assert results['missing_matches'] == [json.loads(""" + { + "file": "main.py", + "line_number": 11, + "col_offset": 1, + "variable": "b", + "type": [ + "str" + ], + "out_type": [] + } + """) + ]