# Support indent regex with inline comments in Python \(\#37903\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6ae83b474079263273d512b68e4bf2b9b390a17d)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6ae83b474079263273d512b68e4bf2b9b390a17d

Requested commit: 6ae83b474079263273d512b68e4bf2b9b390a17d

Commit: 6ae83b474079263273d512b68e4bf2b9b390a17d

Tree: cb07b4153a17a6178f833f7668dffe7f5d3f33f7

Author: ImFeH2

Committer: GitHub

## Message

```
Support indent regex with inline comments in Python (#37903)

Closes #36491

This issue is caused by the Python language configuration treating
compound statements (such as for loops and if statements) that end with
an inline comment as not requiring an increased indent.

Release Notes:

- python: Correctly indent lines starting the blocks (for, finally, if,
else, try) that have trailing comments.
```

## Parents

- [eec6bfebbbc6a8e94c7084824fb1a868be7e42c6](https://git.cafe/gitcafe/zed/commit/eec6bfebbbc6a8e94c7084824fb1a868be7e42c6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6ae83b474079263273d512b68e4bf2b9b390a17d?format=markdown)
