1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2024-11-25 01:38:56 +00:00
Commit graph

11 commits

Author SHA1 Message Date
Eric Wieser
82009b3bde
Use a better python problem matcher
The old matcher only worked if the error was raised with `raise Exception('single quotes')`.

This represents a miniscule fraction of errors; for instance, `l[37]` on a short list `l` can raise `IndexError`, and any call to a builtin C function is not going to trace back to a `raise` call.

Instead, this just matches the first line without fail that comes after the context line.

Note that this is still not foolproof; in Python 3.10, `SyntaxError`s are produced as 
```
  File "<stdin>", line 1
    foo(x, z for z in range(10), t, w)
           ^^^^^^^^^^^^^^^^^^^^
SyntaxError: Generator expression must be parenthesized
```

This matcher will incorrectly pick up `           ^^^^^^^^^^^^^^^^^^^^` as the error message, but the previous behavior was to not pick up any error message at all.

As far as I can tell, this is impossible to handle correctly; the grammar of problem matchers is far too limiting.
2022-06-07 18:21:56 +01:00
Danny McCormick
60f686a148
Update python.json 2019-07-08 15:07:01 -04:00
Danny McCormick
3fb911cdc7
Less escaping 2019-07-08 15:06:11 -04:00
Danny McCormick
7f7fc5b376
Wrong index 2019-07-08 15:03:54 -04:00
Danny McCormick
0524204ca4
multipart 2019-07-08 15:02:46 -04:00
Danny McCormick
6c3425b8b7
message placeholder 2019-07-08 14:55:44 -04:00
Danny McCormick
f2e7c5bedb
Simplify again 2019-07-08 14:54:20 -04:00
Danny McCormick
6e3973ea1c
Little more complex 2019-07-08 14:52:17 -04:00
Danny McCormick
05cb373632
escaping 2019-07-08 14:49:52 -04:00
Danny McCormick
a907799389
Start simple 2019-07-08 14:49:33 -04:00
Danny McCormick
f7f8dbaddf Add matcher 2019-07-08 14:43:29 -04:00