konsti
cab3a507bc
Fix find_only_token_in_range with expression parentheses ( #5645 )
...
## Summary
Fix an oversight in `find_only_token_in_range` where the following code
would panic due do the closing and opening parentheses being in the
range we scan:
```python
d1 = [
("a") if # 1
("b") else # 2
("c")
]
```
Closing and opening parentheses respectively are now correctly skipped.
## Test Plan
I added a regression test
2023-07-10 15:55:19 +02:00
..
2023-07-07 19:11:52 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-04 07:07:20 +00:00
2023-07-03 21:48:44 +02:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-03 09:11:14 +02:00
2023-06-30 06:32:50 +00:00
2023-07-10 12:32:15 +00:00
2023-06-30 06:32:50 +00:00
2023-07-10 12:32:15 +00:00
2023-07-10 12:32:15 +00:00
2023-06-30 06:32:50 +00:00
2023-07-04 07:07:20 +00:00
2023-07-03 09:11:14 +02:00
2023-06-30 06:32:50 +00:00
2023-07-03 21:48:44 +02:00
2023-07-10 12:32:15 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-04 07:07:20 +00:00
2023-06-30 06:32:50 +00:00
2023-07-04 07:07:20 +00:00
2023-07-03 21:48:44 +02:00
2023-07-04 07:07:20 +00:00
2023-07-04 07:07:20 +00:00
2023-06-30 06:32:50 +00:00
2023-07-04 07:07:20 +00:00
2023-07-03 21:48:44 +02:00
2023-07-03 21:48:44 +02:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-07 19:11:52 +00:00
2023-07-04 07:07:20 +00:00
2023-06-30 06:32:50 +00:00
2023-07-03 21:48:44 +02:00
2023-07-03 21:48:44 +02:00
2023-07-07 19:11:52 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-04 07:07:20 +00:00
2023-07-03 21:48:44 +02:00
2023-07-07 19:11:52 +00:00
2023-07-04 07:07:20 +00:00
2023-06-30 06:32:50 +00:00
2023-07-03 09:11:14 +02:00
2023-07-04 07:07:20 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-04 07:07:20 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-03 09:11:14 +02:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 10:13:23 +02:00
2023-07-04 07:07:20 +00:00
2023-07-03 21:48:44 +02:00
2023-06-27 09:29:40 +00:00
2023-07-04 07:07:20 +00:00
2023-07-03 21:48:44 +02:00
2023-07-08 12:33:18 +02:00
2023-07-10 15:55:19 +02:00
2023-07-03 21:48:44 +02:00
2023-07-10 12:32:15 +00:00
2023-06-27 09:29:40 +00:00
2023-07-08 12:33:18 +02:00
2023-06-26 14:15:55 +02:00
2023-06-30 09:52:14 +02:00
2023-07-08 12:33:18 +02:00
2023-06-26 14:15:55 +02:00
2023-06-26 14:15:55 +02:00
2023-06-29 08:09:26 +02:00
2023-06-26 14:15:55 +02:00
2023-06-26 14:15:55 +02:00
2023-06-26 14:15:55 +02:00
2023-07-04 07:07:20 +00:00
2023-07-04 07:07:20 +00:00
2023-07-06 18:23:53 +00:00
2023-06-27 09:29:40 +00:00
2023-07-03 21:48:44 +02:00
2023-06-26 14:15:55 +02:00