Visitar URL original
[pre-commit.ci] auto fixes from pre-commit.com hooks · pytest-dev/pytest@e1691ca · GitHub
Skip to content

Commit e1691ca

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4084565 commit e1691ca

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎src/_pytest/assertion/truncate.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ def materialize_with_truncation(lines: Iterable[str], config: Config) -> list[st
4444
# Pull one line past the point where ``_truncate_explanation`` keeps the
4545
# body whole (``max_lines + TRUNCATION_FOOTER_LINES``) so it can detect the
4646
# overflow, without us materialising more than we need.
47-
line_cap = (
48-
max_lines + TRUNCATION_FOOTER_LINES + 1 if max_lines > 0 else None
49-
)
47+
line_cap = max_lines + TRUNCATION_FOOTER_LINES + 1 if max_lines > 0 else None
5048
buffered: list[str] = []
5149
char_count = 0
5250
for line in lines:

‎testing/test_assertion.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,12 @@ def test_text_diff_budget_caps_ndiff_input(self) -> None:
506506
ndiff_style = util.ASSERTION_TEXT_DIFF_STYLE_NDIFF
507507
capped = list(
508508
_compare_eq_text(
509-
left, right, util.dummy_highlighter, 1, ndiff_style, TruncationBudget(11, 710)
509+
left,
510+
right,
511+
util.dummy_highlighter,
512+
1,
513+
ndiff_style,
514+
TruncationBudget(11, 710),
510515
)
511516
)
512517
full = list(

0 commit comments

Comments
 (0)