File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,10 @@ def escape_backslashes(text: str) -> str:
3737 return text
3838 return text .replace ("\\ " , "\\ \\ " )
3939
40+
4041escape_characters_dict = {
41- v .encode ().decode ("unicode_escape" ): v for v in [
42+ v .encode ().decode ("unicode_escape" ): v
43+ for v in [
4244 "\\ x00" , # Null
4345 "\\ b" , # Backspace
4446 "\\ v" , # Vertical tab
@@ -57,11 +59,9 @@ def escape_backslashes(text: str) -> str:
5759 "\\ u2028" , # Line separator
5860 "\\ u2029" , # Paragraph separator
5961 "\\ ufeff" , # Byte order mark
60- ]
61-
62-
63-
64- }
62+ ]
63+ }
64+
6565
6666def escape_control_characters (text : str ) -> str :
6767 if not text :
Original file line number Diff line number Diff line change 1717from approvaltests .namer .inline_python_reporter import (
1818 detect_trailing_whitespace ,
1919 escape_backslashes ,
20+ escape_characters_dict ,
2021 handle_preceeding_whitespace ,
21- escape_characters_dict
2222)
2323from approvaltests .reporters .report_quietly import ReportQuietly
2424from approvaltests .reporters .report_with_beyond_compare import (
@@ -350,4 +350,4 @@ def test_unicode_right_to_left_mark__incorrect_test() -> None:
350350
351351
352352def test_escape_characters_dict () -> None :
353- verify (escape_characters_dict )
353+ verify (escape_characters_dict )
You can’t perform that action at this time.
0 commit comments