Skip to content

Commit bd9aa41

Browse files
feedback copilot
1 parent 369b6ae commit bd9aa41

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

diffly/summary.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ def _compute_summary_data(
137137
hidden_columns = hidden_columns or []
138138

139139
def _validate_primary_key_hidden_columns() -> None:
140-
overlap = set(hidden_columns).intersection(set(comparison.primary_key or []))
140+
overlap = sorted(
141+
set(hidden_columns).intersection(set(comparison.primary_key or []))
142+
)
141143
if overlap and sample_k_rows_only > 0:
142144
raise ValueError(
143145
f"Cannot show sample rows only on the left or right side when primary"
@@ -343,7 +345,6 @@ def _validate_primary_key_hidden_columns() -> None:
343345
# ---------------------------------------------------------------------------- #
344346

345347

346-
@dataclass
347348
class Summary:
348349
"""Container object for generating a summary of the comparison of two data frames.
349350

tests/summary/test_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _make_comparison() -> DataFrameComparison:
157157
@pytest.mark.parametrize(
158158
"show_perfect_column_matches, show_top_column_changes, slim, sample_rows, sample_pk, hide_value",
159159
[
160-
(*combo[:2], combo[2], combo[3], combo[3] and combo[1], combo[4])
160+
(combo[0], combo[1], combo[2], combo[3], combo[3] and combo[1], combo[4])
161161
for combo in itertools.product([True, False], repeat=5)
162162
],
163163
)

0 commit comments

Comments
 (0)