Skip to content

editor: Add python indentation tests#30902

Merged
smitbarmase merged 1 commit intomainfrom
python-editor-tests
May 18, 2025
Merged

editor: Add python indentation tests#30902
smitbarmase merged 1 commit intomainfrom
python-editor-tests

Conversation

@smitbarmase
Copy link
Member

@zed-industries-bot
Copy link
Contributor

Messages
📖

This PR includes links to the following GitHub Issues: #10832, #30795, #25416, #16288, #26157
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against 23bb125

@smitbarmase smitbarmase merged commit 0079c99 into main May 18, 2025
18 checks passed
@smitbarmase smitbarmase deleted the python-editor-tests branch May 18, 2025 01:59
@notpeter notpeter added the cla-signed The user has signed the Contributor License Agreement label May 19, 2025
smitbarmase pushed a commit that referenced this pull request May 24, 2025
#31260)

Follow-up to #29625 and #30902

This PR reintroduces auto-intents for brackets in Python and fixes some
cases where an indentation would be triggered if it should not. For
example, upon typing

```python
a = []
```
and inserting a newline after, the next line would be indented although
it shoud not be.

Bracket auto-indentation was tested prior to #29625 but removed there
and the test updated accordingly. #30902 reintroduced this for all
brackets but `()`. I reintroduced this here, reverted the changes to the
test so that indents also happen after typing `()`. This is frequently
used for tuples and multiline statements in Python.

Release Notes:

- Improved auto-indentation when using round brackets in Python.
smitbarmase pushed a commit that referenced this pull request May 27, 2025
#31260)

Follow-up to #29625 and #30902

This PR reintroduces auto-intents for brackets in Python and fixes some
cases where an indentation would be triggered if it should not. For
example, upon typing

```python
a = []
```
and inserting a newline after, the next line would be indented although
it shoud not be.

Bracket auto-indentation was tested prior to #29625 but removed there
and the test updated accordingly. #30902 reintroduced this for all
brackets but `()`. I reintroduced this here, reverted the changes to the
test so that indents also happen after typing `()`. This is frequently
used for tuples and multiline statements in Python.

Release Notes:

- Improved auto-indentation when using round brackets in Python.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants