We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e84b077 + a8ebb09 commit 8132696Copy full SHA for 8132696
1 file changed
bpython/repl.py
@@ -1021,6 +1021,9 @@ def next_indentation(line, tab_length):
1021
indentation = (len(line) - len(line.lstrip(' '))) // tab_length
1022
if line.rstrip().endswith(':'):
1023
indentation += 1
1024
+ elif indentation >= 1:
1025
+ if line.lstrip().startswith(('return', 'pass', 'raise', 'yield')):
1026
+ indentation -= 1
1027
return indentation
1028
1029
0 commit comments