Skip to content

Commit

Permalink
Fixed missing reset on _compat.should_strip_ansi.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyl13 authored and AndreasBackx committed Nov 9, 2024
1 parent 273fb90 commit c92ae24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/click/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def should_strip_ansi(
old_hidden_prompt_func = termui.hidden_prompt_func
old__getchar_func = termui._getchar
old_should_strip_ansi = utils.should_strip_ansi # type: ignore
old__compat_should_strip_ansi = _compat.should_strip_ansi
termui.visible_prompt_func = visible_input
termui.hidden_prompt_func = hidden_input
termui._getchar = _getchar
Expand Down Expand Up @@ -346,6 +347,7 @@ def should_strip_ansi(
termui.hidden_prompt_func = old_hidden_prompt_func
termui._getchar = old__getchar_func
utils.should_strip_ansi = old_should_strip_ansi # type: ignore
_compat.should_strip_ansi = old__compat_should_strip_ansi
formatting.FORCED_WIDTH = old_forced_width

def invoke(
Expand Down

0 comments on commit c92ae24

Please sign in to comment.