We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c6a895 commit 199a6bcCopy full SHA for 199a6bc
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')):
1026
+ indentation -= 1
1027
return indentation
1028
1029
0 commit comments