Skip to content

Commit cbb3d5b

Browse files
committed
. d tidy code and update markdown snippets
1 parent 9c899e1 commit cbb3d5b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

approvaltests/namer/inline_python_reporter.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ def escape_backslashes(text: str) -> str:
3737
return text
3838
return text.replace("\\", "\\\\")
3939

40+
4041
escape_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

6666
def escape_control_characters(text: str) -> str:
6767
if not text:

tests/test_inline_approvals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from 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
)
2323
from approvaltests.reporters.report_quietly import ReportQuietly
2424
from approvaltests.reporters.report_with_beyond_compare import (
@@ -350,4 +350,4 @@ def test_unicode_right_to_left_mark__incorrect_test() -> None:
350350

351351

352352
def test_escape_characters_dict() -> None:
353-
verify(escape_characters_dict)
353+
verify(escape_characters_dict)

0 commit comments

Comments
 (0)