Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion driver/normalizer/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ var AnnotationRules = On(Any).Self(
),

On(pyast.Attribute).Roles(uast.Identifier, uast.Expression).Children(
On(pyast.Name).Roles(uast.Identifier, uast.Qualified)),
On(pyast.Name).Roles(uast.Qualified)),

On(pyast.Call).Roles(uast.Function, uast.Call, uast.Expression).Children(
On(HasInternalRole("args")).Roles(uast.Function, uast.Call, uast.Positional, uast.Argument, uast.Name),
Expand Down
14 changes: 7 additions & 7 deletions fixtures/classdef.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 46
Expand Down Expand Up @@ -363,7 +363,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 157
Expand Down Expand Up @@ -560,7 +560,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 205
Expand Down Expand Up @@ -625,7 +625,7 @@ Module {
. . . . . . . . . . . }
. . . . . . . . . . . Children: {
. . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . TOKEN "a"
. . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . Offset: 171
Expand Down Expand Up @@ -777,7 +777,7 @@ Module {
. . . . . }
. . . . . Children: {
. . . . . . 0: Name {
. . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . TOKEN "a"
. . . . . . . StartPosition: {
. . . . . . . . Offset: 234
Expand Down Expand Up @@ -935,7 +935,7 @@ Module {
. . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . TOKEN "a"
. . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . Offset: 242
Expand Down Expand Up @@ -1041,7 +1041,7 @@ Module {
. . . . . . . }
. . . . . . . Children: {
. . . . . . . . 0: Name {
. . . . . . . . . Roles: Identifier,Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . Roles: Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . TOKEN "a"
. . . . . . . . . StartPosition: {
. . . . . . . . . . Offset: 260
Expand Down
2 changes: 1 addition & 1 deletion fixtures/functioncalls.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Module {
. . . . . . . }
. . . . . . . Children: {
. . . . . . . . 0: Name {
. . . . . . . . . Roles: Identifier,Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . Roles: Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . TOKEN "a"
. . . . . . . . . StartPosition: {
. . . . . . . . . . Offset: 42
Expand Down
2 changes: 1 addition & 1 deletion fixtures/issue30.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Module {
. . . . . . . . . }
. . . . . . . . . Children: {
. . . . . . . . . . 0: Name {
. . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . TOKEN "sys"
. . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . Offset: 11
Expand Down
2 changes: 1 addition & 1 deletion fixtures/issue51.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Module {
. . . . . . . }
. . . . . . . Children: {
. . . . . . . . 0: Name {
. . . . . . . . . Roles: Identifier,Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . Roles: Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . TOKEN "plt"
. . . . . . . . . StartPosition: {
. . . . . . . . . . Offset: 0
Expand Down
16 changes: 8 additions & 8 deletions fixtures/issue62_b.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ Module {
. . . . . . . . . . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . . . . . . . TOKEN "ch"
. . . . . . . . . . . . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . . . . . . . . . . . Offset: 466
Expand Down Expand Up @@ -732,7 +732,7 @@ Module {
. . . . . . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . . . TOKEN "ch"
. . . . . . . . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . . . . . . . Offset: 433
Expand Down Expand Up @@ -861,7 +861,7 @@ Module {
. . . . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . . . . . . . Roles: Identifier,Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . Roles: Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . . . . . Offset: 493
Expand Down Expand Up @@ -905,7 +905,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "root"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 382
Expand Down Expand Up @@ -1221,7 +1221,7 @@ Module {
. . . . . . . . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . . . . . TOKEN "file_uast"
. . . . . . . . . . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . . . . . . . . . Offset: 661
Expand Down Expand Up @@ -1406,7 +1406,7 @@ Module {
. . . . . . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . . . TOKEN "file_uast"
. . . . . . . . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . . . . . . . Offset: 745
Expand Down Expand Up @@ -1464,7 +1464,7 @@ Module {
. . . . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . . . . . . . Roles: Identifier,Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . Roles: Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . . . . . Offset: 725
Expand Down Expand Up @@ -1829,7 +1829,7 @@ Module {
. . . . . . . . . . . }
. . . . . . . . . . . Children: {
. . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . Roles: Identifier,Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . . . . . Roles: Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . . . . . TOKEN "c2v"
. . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . Offset: 946
Expand Down
6 changes: 3 additions & 3 deletions fixtures/issue76.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Module {
. . . . . . . . . . . }
. . . . . . . . . . . Children: {
. . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . Roles: Identifier,Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . . . . . Roles: Qualified,Call,Receiver,Identifier,Expression
. . . . . . . . . . . . . TOKEN "out"
. . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . Offset: 71
Expand Down Expand Up @@ -209,7 +209,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "args"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 23
Expand Down Expand Up @@ -282,7 +282,7 @@ Module {
. . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . . . TOKEN "os"
. . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . Offset: 10
Expand Down
6 changes: 3 additions & 3 deletions fixtures/issue94.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 220
Expand Down Expand Up @@ -683,7 +683,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "class1"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 261
Expand Down Expand Up @@ -749,7 +749,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 284
Expand Down
6 changes: 3 additions & 3 deletions fixtures/issue96.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 220
Expand Down Expand Up @@ -683,7 +683,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "class1"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 261
Expand Down Expand Up @@ -749,7 +749,7 @@ Module {
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: Name {
. . . . . . . . . . . . . . . Roles: Identifier,Qualified,Identifier,Expression
. . . . . . . . . . . . . . . Roles: Qualified,Identifier,Expression
. . . . . . . . . . . . . . . TOKEN "self"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 284
Expand Down
Loading