@@ -16,7 +16,7 @@ def _assert_all_fragments_bracket_balanced(frags):
1616 if frag .kind in _CONTAINER_HEADER_KINDS :
1717 continue
1818 balance = _compute_bracket_balance (frag .content )
19- assert balance == 0 , f"Unbalanced brackets (balance={ balance } ) in fragment { frag .id } : " f" { frag .content [:80 ]} "
19+ assert balance == 0 , f"Unbalanced brackets (balance={ balance } ) in fragment { frag .id } : { frag .content [:80 ]} "
2020
2121
2222def _assert_fragments_span_file (frags , total_file_lines ):
@@ -25,9 +25,9 @@ def _assert_fragments_span_file(frags, total_file_lines):
2525 min_start = min (f .id .start_line for f in frags )
2626 max_end = max (f .id .end_line for f in frags )
2727 assert min_start == 1 , f"First fragment should start at line 1, starts at { min_start } "
28- assert max_end >= total_file_lines - 1 , (
29- f"Last fragment should reach near end of file " f"(line { total_file_lines } ), ends at { max_end } "
30- )
28+ assert (
29+ max_end >= total_file_lines - 1
30+ ), f"Last fragment should reach near end of file (line { total_file_lines } ), ends at { max_end } "
3131
3232
3333class TestBracketBalancedFragments :
@@ -235,7 +235,7 @@ def test_large_text_non_final_fragments_end_at_sentence_boundary(self):
235235 content = frag .content .rstrip ()
236236 if content :
237237 last_char = content [- 1 ]
238- assert last_char in '.!?"' , f"Non-final fragment should end at sentence boundary: " f" ...{ content [- 50 :]} "
238+ assert last_char in '.!?"' , f"Non-final fragment should end at sentence boundary: ...{ content [- 50 :]} "
239239
240240
241241class TestEdgeCases :
@@ -342,9 +342,9 @@ def _assert_fragment_lines_match_content(self, frags, content):
342342 all_lines = content .splitlines ()
343343 for frag in frags :
344344 assert 1 <= frag .start_line <= len (all_lines ), f"start_line { frag .start_line } out of range [1, { len (all_lines )} ]"
345- assert frag . start_line <= frag . end_line <= len ( all_lines ), (
346- f"end_line { frag .end_line } out of range " f"[ { frag .start_line } , { len (all_lines )} ]"
347- )
345+ assert (
346+ frag .start_line <= frag .end_line <= len (all_lines )
347+ ), f"end_line { frag . end_line } out of range [ { frag . start_line } , { len ( all_lines ) } ]"
348348 expected = "\n " .join (all_lines [frag .start_line - 1 : frag .end_line ])
349349 if not expected .endswith ("\n " ):
350350 expected += "\n "
0 commit comments