Skip to content
Draft
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
Prev Previous commit
Fix order of re.sub parameters
  • Loading branch information
alexprengere committed Nov 29, 2025
commit 56be759934431cf05ddc897d5c5bb06e10a3f3b7
2 changes: 1 addition & 1 deletion Lib/textwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width):

def _str_len_without_ansi_escape_codes(self, s):
"""Return the length of string s without ANSI escape codes."""
return len(self.ansi_escape_re.sub(s, ""))
return len(self.ansi_escape_re.sub("", s))

def _wrap_chunks(self, chunks):
"""_wrap_chunks(chunks : [string]) -> [string]
Expand Down
Loading