diff --git a/driver/normalizer/normalizer.go b/driver/normalizer/normalizer.go index 5ff3fb9d..a56af556 100644 --- a/driver/normalizer/normalizer.go +++ b/driver/normalizer/normalizer.go @@ -411,10 +411,10 @@ var Normalizers = []Mapping{ }, Obj{ "Name": UASTType(uast.Identifier{}, Obj{ - "Name": Var("name"), + "Name": Var("alias"), }), "Node": UASTType(uast.Identifier{}, - Obj{"Name": Var("alias")}, + Obj{"Name": Var("name")}, ), }, )), diff --git a/fixtures/bench_javaobs.py.sem.uast b/fixtures/bench_javaobs.py.sem.uast index 63a01e91..3653203e 100644 --- a/fixtures/bench_javaobs.py.sem.uast +++ b/fixtures/bench_javaobs.py.sem.uast @@ -201,10 +201,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "StringIO", + Name: "BytesIO", }, Node: { '@type': "uast:Identifier", - Name: "BytesIO", + Name: "StringIO", }, }, ], diff --git a/fixtures/issue62.py.sem.uast b/fixtures/issue62.py.sem.uast index 06010899..913ed7d1 100644 --- a/fixtures/issue62.py.sem.uast +++ b/fixtures/issue62.py.sem.uast @@ -60,10 +60,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "numpy", + Name: "np", }, Node: { '@type': "uast:Identifier", - Name: "np", + Name: "numpy", }, }, Target: ~, diff --git a/fixtures/issue94.py.sem.uast b/fixtures/issue94.py.sem.uast index 8d9983cc..c4eb5ba5 100644 --- a/fixtures/issue94.py.sem.uast +++ b/fixtures/issue94.py.sem.uast @@ -51,10 +51,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "lib3", + Name: "lib3_alias", }, Node: { '@type': "uast:Identifier", - Name: "lib3_alias", + Name: "lib3", }, }, Target: ~, @@ -125,10 +125,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "lib61", + Name: "lib611", }, Node: { '@type': "uast:Identifier", - Name: "lib611", + Name: "lib61", }, }, ], diff --git a/fixtures/issue96.py.sem.uast b/fixtures/issue96.py.sem.uast index 8d9983cc..c4eb5ba5 100644 --- a/fixtures/issue96.py.sem.uast +++ b/fixtures/issue96.py.sem.uast @@ -51,10 +51,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "lib3", + Name: "lib3_alias", }, Node: { '@type': "uast:Identifier", - Name: "lib3_alias", + Name: "lib3", }, }, Target: ~, @@ -125,10 +125,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "lib61", + Name: "lib611", }, Node: { '@type': "uast:Identifier", - Name: "lib611", + Name: "lib61", }, }, ], diff --git a/fixtures/issue_server101.py.sem.uast b/fixtures/issue_server101.py.sem.uast index 92609349..4ecc4c07 100644 --- a/fixtures/issue_server101.py.sem.uast +++ b/fixtures/issue_server101.py.sem.uast @@ -54341,10 +54341,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "InterfaceClass", + Name: "_ZopeInterfaceClass", }, Node: { '@type': "uast:Identifier", - Name: "_ZopeInterfaceClass", + Name: "InterfaceClass", }, }, ], @@ -54480,10 +54480,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "ExtensionClass", + Name: "_ExtensionClass", }, Node: { '@type': "uast:Identifier", - Name: "_ExtensionClass", + Name: "ExtensionClass", }, }, ], @@ -54834,10 +54834,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "PythonMethodType", + Name: "_ZopeMethodType", }, Node: { '@type': "uast:Identifier", - Name: "_ZopeMethodType", + Name: "PythonMethodType", }, }, ], @@ -54865,10 +54865,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "ExtensionMethodType", + Name: "_ZopeCMethodType", }, Node: { '@type': "uast:Identifier", - Name: "_ZopeCMethodType", + Name: "ExtensionMethodType", }, }, ], diff --git a/fixtures/u2_import_module_alias.py.sem.uast b/fixtures/u2_import_module_alias.py.sem.uast index b9d7e8a7..ff3affad 100644 --- a/fixtures/u2_import_module_alias.py.sem.uast +++ b/fixtures/u2_import_module_alias.py.sem.uast @@ -17,10 +17,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "x", + Name: "y", }, Node: { '@type': "uast:Identifier", - Name: "y", + Name: "x", }, }, Target: ~, diff --git a/fixtures/u2_import_rename.py.sem.uast b/fixtures/u2_import_rename.py.sem.uast index 2c2dd359..c029601c 100644 --- a/fixtures/u2_import_rename.py.sem.uast +++ b/fixtures/u2_import_rename.py.sem.uast @@ -17,10 +17,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "a", + Name: "b", }, Node: { '@type': "uast:Identifier", - Name: "b", + Name: "a", }, }, Target: ~, @@ -44,10 +44,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "e", + Name: "f", }, Node: { '@type': "uast:Identifier", - Name: "f", + Name: "e", }, }, ], diff --git a/fixtures/u2_import_subsymbol_alias.py.sem.uast b/fixtures/u2_import_subsymbol_alias.py.sem.uast index 6363a45d..dc50918b 100644 --- a/fixtures/u2_import_subsymbol_alias.py.sem.uast +++ b/fixtures/u2_import_subsymbol_alias.py.sem.uast @@ -17,10 +17,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "x.y", + Name: "z", }, Node: { '@type': "uast:Identifier", - Name: "z", + Name: "x.y", }, }, Target: ~, @@ -44,10 +44,10 @@ '@pos': { '@type': "uast:Positions", }, Name: { '@type': "uast:Identifier", - Name: "b", + Name: "c", }, Node: { '@type': "uast:Identifier", - Name: "c", + Name: "b", }, }, ],