Skip to content

Commit 0067b84

Browse files
committed
shorten name to apply_output_formatting
1 parent 536096a commit 0067b84

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/datajudge/constraints/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def test(self, engine: sa.engine.Engine) -> TestResult:
256256
target_queries,
257257
)
258258

259-
def apply_output_formatting_no_counts(self, values: Collection) -> Collection:
259+
def apply_output_formatting(self, values: Collection) -> Collection:
260260
if self.output_processors is not None:
261261
for output_processor in self.output_processors:
262262
values, _ = output_processor(values)

src/datajudge/constraints/miscs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def test(self, engine: sa.engine.Engine) -> TestResult:
134134
+ "\n".join(
135135
[
136136
f"{violation}"
137-
for violation in self.apply_output_formatting_no_counts(
137+
for violation in self.apply_output_formatting(
138138
[tuple(elem) for elem in violations]
139139
)
140140
]

src/datajudge/constraints/uniques.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -183,22 +183,22 @@ def compare(
183183
if not is_subset and not is_superset:
184184
assertion_text = (
185185
f"{self.ref} doesn't have the element(s) "
186-
f"'{self.apply_output_formatting_no_counts(lacking_values)}' and has the excess element(s) "
187-
f"'{self.apply_output_formatting_no_counts(excess_values)}' when compared with the reference values. "
186+
f"'{self.apply_output_formatting(lacking_values)}' and has the excess element(s) "
187+
f"'{self.apply_output_formatting(excess_values)}' when compared with the reference values. "
188188
f"{self.condition_string}"
189189
)
190190
return False, assertion_text
191191
if not is_subset:
192192
assertion_text = (
193193
f"{self.ref} has the excess element(s) "
194-
f"'{self.apply_output_formatting_no_counts(excess_values)}' when compared with the reference values. "
194+
f"'{self.apply_output_formatting(excess_values)}' when compared with the reference values. "
195195
f"{self.condition_string}"
196196
)
197197
return False, assertion_text
198198
if not is_superset:
199199
assertion_text = (
200200
f"{self.ref} doesn't have the element(s) "
201-
f"'{self.apply_output_formatting_no_counts(lacking_values)}' when compared with the reference values. "
201+
f"'{self.apply_output_formatting(lacking_values)}' when compared with the reference values. "
202202
f"{self.condition_string}"
203203
)
204204
return False, assertion_text
@@ -241,7 +241,7 @@ def compare(
241241
assertion_text = (
242242
f"{self.ref} has a fraction of {relative_violations} > "
243243
f"{self.max_relative_violations} {'DISTINCT ' if self.compare_distinct else ''}values ({n_violations} / {n_rows}) not being an element of "
244-
f"'{self.apply_output_formatting_no_counts(set(target_values))}'. It has excess elements "
244+
f"'{self.apply_output_formatting(set(target_values))}'. It has excess elements "
245245
f"'{output_elemes}' "
246246
f"with counts {output_counts}."
247247
f"{self.condition_string}"
@@ -276,8 +276,8 @@ def compare(
276276
assertion_text = (
277277
f"{self.ref} has a fraction of "
278278
f"{relative_violations} > {self.max_relative_violations} ({n_violations} / {n_rows}) "
279-
f"lacking unique values of '{self.apply_output_formatting_no_counts(set(target_values))}'. It "
280-
f"doesn't have the unique value(s) '{self.apply_output_formatting_no_counts(list(remainder))}'."
279+
f"lacking unique values of '{self.apply_output_formatting(set(target_values))}'. It "
280+
f"doesn't have the unique value(s) '{self.apply_output_formatting(list(remainder))}'."
281281
f"{self.condition_string}"
282282
)
283283
return False, assertion_text

0 commit comments

Comments
 (0)