File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import pythonrc
99
1010is_wsl = "microsoft-standard-WSL" in platform .release ()
11- prompt_is_installed = not is_wsl and (
12- sys .platform != "win32" or sys .version_info >= (3 , 13 )
13- )
11+ prompt_is_installed = not is_wsl and (sys .platform != "win32" or sys .version_info >= (3 , 13 ))
1412
1513PYTHONRC_PATH = Path (pythonrc .__file__ )
1614
@@ -25,10 +23,7 @@ class _PS1(Protocol):
2523
2624def _expected_prompt (exit_code : int ) -> str :
2725 if sys .platform == "win32" :
28- return (
29- f"\x1b ]633;D;{ exit_code } \x07 \x1b ]633;A\x07 >>> "
30- "\x1b ]633;B\x07 \x1b ]633;C\x07 "
31- )
26+ return f"\x1b ]633;D;{ exit_code } \x07 \x1b ]633;A\x07 >>> \x1b ]633;B\x07 \x1b ]633;C\x07 "
3227 return (
3328 "\x01 \x1b ]633;C\x07 \x1b ]633;E;None\x07 "
3429 f"\x1b ]633;D;{ exit_code } \x07 \x1b ]633;A\x07 \x02 >>> \x01 \x1b ]633;B\x07 \x02 "
@@ -93,9 +88,7 @@ def test_replacement_regex_removes_bel_terminated_osc():
9388 pyrepl_utils = importlib .import_module ("_pyrepl.utils" )
9489 importlib .reload (pythonrc )
9590
96- assert pyrepl_utils .ANSI_ESCAPE_SEQUENCE .sub ("" , "before\x1b ]633;A\x07 after" ) == (
97- "beforeafter"
98- )
91+ assert pyrepl_utils .ANSI_ESCAPE_SEQUENCE .sub ("" , "before\x1b ]633;A\x07 after" ) == ("beforeafter" )
9992
10093
10194def test_replacement_regex_removes_st_terminated_osc ():
You can’t perform that action at this time.
0 commit comments