Skip to content

Commit 0e33f73

Browse files
authored
Merge pull request #7329 from tausbn/tausbn/python-fix-syntax-error-locations
Python: Fix syntax error locations
2 parents bf0ecde + 59bac04 commit 0e33f73

File tree

6 files changed

+28
-3
lines changed

6 files changed

+28
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| nonsense.py:1:14:1:14 | Syntax Error | Syntax Error (in Python 2). |
1+
| nonsense.py:0:1:0:1 | Syntax Error | Syntax Error (in Python 2). |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
| test.py:0:0:0:0 | Module test |
2+
| test.py:1:1:5:2 | With |
3+
| test.py:2:5:2:15 | CtxManager1 |
4+
| test.py:2:5:2:17 | CtxManager1() |
5+
| test.py:2:22:2:29 | example1 |
6+
| test.py:3:5:3:15 | CtxManager2 |
7+
| test.py:3:5:3:17 | CtxManager2() |
8+
| test.py:3:5:3:29 | With |
9+
| test.py:3:22:3:29 | example2 |
10+
| test.py:4:5:4:15 | CtxManager3 |
11+
| test.py:4:5:4:17 | CtxManager3() |
12+
| test.py:4:5:4:29 | With |
13+
| test.py:4:22:4:29 | example3 |
14+
| test.py:4:31:4:30 | |
15+
| test.py:4:31:4:30 | With |
16+
| test.py:6:5:6:8 | Pass |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
with (
2+
CtxManager1() as example1,
3+
CtxManager2() as example2,
4+
CtxManager3() as example3,
5+
):
6+
pass
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import python
2+
3+
select any(AstNode n)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| nonsense.py:1:2:1:2 | Syntax Error | Syntax Error (in Python 3). |
1+
| nonsense.py:0:1:0:1 | Syntax Error | Syntax Error (in Python 3). |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
| bad_encoding.py:2:11:2:11 | Encoding Error | Extraction failed in bad_encoding.py with error 'utf-8' codec can't decode byte 0x9d in position 87: invalid start byte | 1 |
2-
| syntax_error.py:1:31:1:31 | Syntax Error | Extraction failed in syntax_error.py with error Syntax Error | 1 |
2+
| syntax_error.py:1:1:1:1 | Syntax Error | Extraction failed in syntax_error.py with error Syntax Error | 1 |

0 commit comments

Comments
 (0)