Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #161 from juanjux/fix/endpositions
Browse files Browse the repository at this point in the history
Fix endpositions offset
  • Loading branch information
juanjux authored Jul 26, 2018
2 parents 86a0e01 + 393db9d commit 96e800b
Show file tree
Hide file tree
Showing 297 changed files with 13,013 additions and 13,012 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.sdk
build
.mypy_cache
fixtures/*_got
.local/*
.cache/*
__pycache__
Expand Down
8 changes: 4 additions & 4 deletions fixtures/_integration.py.legacy
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Module {
. . . . Col: 7
. . . }
. . . EndPosition: {
. . . . Offset: 13
. . . . Offset: 14
. . . . Line: 1
. . . . Col: 14
. . . . Col: 15
. . . }
. . . Properties: {
. . . . internalRole: body
Expand Down Expand Up @@ -45,9 +45,9 @@ Module {
. . . . . . . . Col: 5
. . . . . . . }
. . . . . . . EndPosition: {
. . . . . . . . Offset: 23
. . . . . . . . Offset: 24
. . . . . . . . Line: 2
. . . . . . . . Col: 8
. . . . . . . . Col: 9
. . . . . . . }
. . . . . . . Properties: {
. . . . . . . . internalRole: body_stmts
Expand Down
4 changes: 2 additions & 2 deletions fixtures/_integration.py.native
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
{
'ast_type': "Pass",
'col_offset': 5,
'end_col_offset': 8,
'end_col_offset': 9,
'end_lineno': 2,
lineno: 2,
},
],
'col_offset': 7,
'decorator_list': [],
'end_col_offset': 14,
'end_col_offset': 15,
'end_lineno': 1,
keywords: [],
lineno: 1,
Expand Down
8 changes: 4 additions & 4 deletions fixtures/_integration.py.sem.uast
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
col: 7,
},
end: { '@type': "uast:Position",
offset: 13,
offset: 14,
line: 1,
col: 14,
col: 15,
},
},
bases: { '@type': "ClassDef.bases",
Expand All @@ -35,9 +35,9 @@
col: 5,
},
end: { '@type': "uast:Position",
offset: 23,
offset: 24,
line: 2,
col: 8,
col: 9,
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions fixtures/_integration.py.uast
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
col: 7,
},
end: { '@type': "uast:Position",
offset: 13,
offset: 14,
line: 1,
col: 14,
col: 15,
},
},
bases: { '@type': "ClassDef.bases",
Expand All @@ -35,9 +35,9 @@
col: 5,
},
end: { '@type': "uast:Position",
offset: 23,
offset: 24,
line: 2,
col: 8,
col: 9,
},
},
},
Expand Down
26 changes: 13 additions & 13 deletions fixtures/annotations.py.native
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'ast_type': "Name",
'col_offset': 4,
ctx: "Load",
'end_col_offset': 6,
'end_col_offset': 7,
'end_lineno': 1,
id: "int",
lineno: 1,
Expand All @@ -20,15 +20,15 @@
'ast_type': "Name",
'col_offset': 1,
ctx: "Store",
'end_col_offset': 1,
'end_col_offset': 2,
'end_lineno': 1,
id: "a",
lineno: 1,
},
value: {
'ast_type': "Num",
'col_offset': 10,
'end_col_offset': 10,
'end_col_offset': 11,
'end_lineno': 1,
lineno: 1,
'n': 1,
Expand All @@ -39,7 +39,7 @@
'ast_type': "Name",
'col_offset': 4,
ctx: "Load",
'end_col_offset': 8,
'end_col_offset': 9,
'end_lineno': 2,
id: "float",
lineno: 2,
Expand All @@ -52,7 +52,7 @@
'ast_type': "Name",
'col_offset': 1,
ctx: "Store",
'end_col_offset': 1,
'end_col_offset': 2,
'end_lineno': 2,
id: "b",
lineno: 2,
Expand All @@ -68,14 +68,14 @@
'ast_type': "Name",
'col_offset': 17,
ctx: "Load",
'end_col_offset': 19,
'end_col_offset': 20,
'end_lineno': 3,
id: "int",
lineno: 3,
},
'ast_type': "arg",
'col_offset': 14,
'end_col_offset': 14,
'end_col_offset': 15,
'end_lineno': 3,
lineno: 3,
},
Expand All @@ -85,14 +85,14 @@
'ast_type': "Name",
'col_offset': 25,
ctx: "Load",
'end_col_offset': 27,
'end_col_offset': 28,
'end_lineno': 3,
id: "str",
lineno: 3,
},
'ast_type': "arg",
'col_offset': 22,
'end_col_offset': 22,
'end_col_offset': 23,
'end_lineno': 3,
lineno: 3,
},
Expand All @@ -104,13 +104,13 @@
{
'ast_type': "Return",
'col_offset': 5,
'end_col_offset': 10,
'end_col_offset': 11,
'end_lineno': 4,
lineno: 4,
value: {
'ast_type': "Num",
'col_offset': 12,
'end_col_offset': 14,
'end_col_offset': 15,
'end_lineno': 4,
lineno: 4,
'n': 0,
Expand All @@ -119,15 +119,15 @@
],
'col_offset': 5,
'decorator_list': [],
'end_col_offset': 12,
'end_col_offset': 13,
'end_lineno': 3,
lineno: 3,
name: "somefunc",
returns: {
'ast_type': "Name",
'col_offset': 33,
ctx: "Load",
'end_col_offset': 37,
'end_col_offset': 38,
'end_lineno': 3,
id: "float",
lineno: 3,
Expand Down
48 changes: 24 additions & 24 deletions fixtures/annotations.py.sem.uast
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
col: 4,
},
end: { '@type': "uast:Position",
offset: 5,
offset: 6,
line: 1,
col: 6,
col: 7,
},
},
Name: "int",
Expand All @@ -36,9 +36,9 @@
col: 1,
},
end: { '@type': "uast:Position",
offset: 0,
offset: 1,
line: 1,
col: 1,
col: 2,
},
},
Name: "a",
Expand All @@ -53,9 +53,9 @@
col: 10,
},
end: { '@type': "uast:Position",
offset: 9,
offset: 10,
line: 1,
col: 10,
col: 11,
},
},
},
Expand All @@ -77,9 +77,9 @@
col: 4,
},
end: { '@type': "uast:Position",
offset: 18,
offset: 19,
line: 2,
col: 8,
col: 9,
},
},
Name: "float",
Expand All @@ -93,9 +93,9 @@
col: 1,
},
end: { '@type': "uast:Position",
offset: 11,
offset: 12,
line: 2,
col: 1,
col: 2,
},
},
Name: "b",
Expand All @@ -110,9 +110,9 @@
col: 5,
},
end: { '@type': "uast:Position",
offset: 31,
offset: 32,
line: 3,
col: 12,
col: 13,
},
},
Nodes: [
Expand All @@ -136,9 +136,9 @@
col: 5,
},
end: { '@type': "uast:Position",
offset: 68,
offset: 69,
line: 4,
col: 10,
col: 11,
},
},
value: { '@type': "Num",
Expand All @@ -151,9 +151,9 @@
col: 12,
},
end: { '@type': "uast:Position",
offset: 72,
offset: 73,
line: 4,
col: 14,
col: 15,
},
},
},
Expand All @@ -170,9 +170,9 @@
col: 14,
},
end: { '@type': "uast:Position",
offset: 33,
offset: 34,
line: 3,
col: 14,
col: 15,
},
},
Init: ~,
Expand All @@ -185,9 +185,9 @@
col: 14,
},
end: { '@type': "uast:Position",
offset: 33,
offset: 34,
line: 3,
col: 14,
col: 15,
},
},
Name: "a",
Expand All @@ -204,9 +204,9 @@
col: 22,
},
end: { '@type': "uast:Position",
offset: 41,
offset: 42,
line: 3,
col: 22,
col: 23,
},
},
Init: ~,
Expand All @@ -219,9 +219,9 @@
col: 22,
},
end: { '@type': "uast:Position",
offset: 41,
offset: 42,
line: 3,
col: 22,
col: 23,
},
},
Name: "b",
Expand Down
Loading

0 comments on commit 96e800b

Please sign in to comment.