Files
oak-gpui/crates
Ben Kunkle e273de5490 python: Fix incorrect indenting of except, finally, else, and elif control flow (#27428)
Closes #10832

Note: This PR only fixes the issue where when entering one of `except`,
`finally`, `else`, and `elif` after another block like so:

```python
try:
    for i in range(n):
        pass
except:|
```

The `except` would be indented resulting in the following:

```python
try:
    for i in range(n):
        pass
    except:|
```

This PR does not fix a separate issue in which the indentation is not
corrected from the second example to the first, i.e. if example 2 is
typed verbatim in Zed it will not auto-indent to look like example 1.
Handling of this case would likely require specific logic to handle, or
changes to the tree-sitter grammar for Python, as the current grammar
results in ERROR nodes that obscure the natural structure (cannot tie
the `except` to the `try`)

Release Notes:

- Fixed an issue where `except`, `finally`, `else`, and `elif` control
flow keywords in Python would be incorrectly indented when entered at
the correct level of indentation.
2025-03-25 14:58:41 +00:00
..
2025-03-21 10:04:39 -06:00
2025-03-22 02:56:25 +00:00
2025-01-27 13:40:59 -05:00
2025-03-10 13:38:30 -06:00
2025-03-24 16:29:18 +00:00
2025-03-18 12:55:25 -04:00
2025-03-24 22:31:11 -07:00
2025-03-06 10:56:28 -07:00
2025-03-24 22:31:11 -07:00
2025-03-24 22:31:11 -07:00
2025-03-21 20:08:03 +00:00