Skip to content

gh-111201: fix auto-indent in pyrepl for muliple pound comments #123196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

wiggin15
Copy link
Contributor

@wiggin15 wiggin15 commented Aug 21, 2024

This commit fixes an issue where a line that contains a control flow statement (if, for, ..) but ends with a comment that starts with multiple "#" signs, will not auto-indent the next line.
This happened because last_char could be updated to one of the "#" signs, missing the actual last character before the comment.

@pablogsal pablogsal enabled auto-merge (squash) September 3, 2024 12:46
@pablogsal pablogsal closed this Sep 3, 2024
auto-merge was automatically disabled September 3, 2024 12:46

Pull request was closed

@pablogsal pablogsal reopened this Sep 3, 2024
@pablogsal pablogsal enabled auto-merge (squash) September 3, 2024 12:46
@pablogsal pablogsal merged commit d683f49 into python:main Sep 6, 2024
40 checks passed
@miss-islington-app
Copy link

Thanks @wiggin15 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 6, 2024
@bedevere-app
Copy link

bedevere-app bot commented Sep 6, 2024

GH-123764 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 6, 2024
ambv pushed a commit that referenced this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants