-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
Description
Bug Description
The else statement in a try/except/else/finally is automatically nested incorrectly.
How To Reproduce
Steps to reproduce the behaviour:
In the editor, copy and paste this:
def foo():
try:
print("try")
except:
print("exception")
else:
print("else")
finally:
print("finally")Now remove the else: print("else") and manually try to type it.
After typing else when pressing the : key, the indentation goes to the left one level more than it should.
Works fine for finally:.
Expected behavior
To be nested to the same level as try, except, and finally.
Screenshots
Video showing this issue:
Kapture.2022-07-05.at.14.31.39.mp4
Environment
Desktop (please complete the following information):
- OS: macOS
- Browser Chrome
- Version 103
Additional context
N/A