Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fixed auto indentation size for lines with comments
  • Loading branch information
AnsonTrapani authored Jul 29, 2024
commit 072b3db6522b60160a16075c92187faa1723ffaf
4 changes: 3 additions & 1 deletion Lib/_pyrepl/readline.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ def _should_auto_indent(buffer: list[str], pos: int) -> bool:
if buffer[pos] == "\n":
break
if buffer[pos] == "#":
last_char = None
last_char = "#"
elif last_char == "#" and buffer[pos] == ":":
last_char = ":"
return last_char == ":"


Expand Down