9494 from collections.abc import Collection
9595 from typing import Any
9696
97- from pointblank._typing import AbsoluteBounds, Tolerance
97+ from pointblank._typing import AbsoluteBounds, Tolerance, _CompliantValue, _CompliantValues
9898
9999__all__ = [
100100 "Validate",
@@ -12110,7 +12110,7 @@ def _process_action_str(
1211012110
1211112111
1211212112def _create_autobrief_or_failure_text(
12113- assertion_type: str, lang: str, column: str | None , values: str | None, for_failure: bool
12113+ assertion_type: str, lang: str, column: str, values: str | None, for_failure: bool
1211412114) -> str:
1211512115 if assertion_type in [
1211612116 "col_vals_gt",
@@ -12250,7 +12250,7 @@ def _expect_failure_type(for_failure: bool) -> str:
1225012250def _create_text_comparison(
1225112251 assertion_type: str,
1225212252 lang: str,
12253- column: str | list[str] | None ,
12253+ column: str | list[str],
1225412254 values: str | None,
1225512255 for_failure: bool = False,
1225612256) -> str:
@@ -12276,7 +12276,7 @@ def _create_text_comparison(
1227612276
1227712277def _create_text_between(
1227812278 lang: str,
12279- column: str | None ,
12279+ column: str,
1228012280 value_1: str,
1228112281 value_2: str,
1228212282 not_: bool = False,
@@ -12306,7 +12306,7 @@ def _create_text_between(
1230612306
1230712307
1230812308def _create_text_set(
12309- lang: str, column: str | None , values: list[any], not_: bool = False, for_failure: bool = False
12309+ lang: str, column: str, values: list[any], not_: bool = False, for_failure: bool = False
1231012310) -> str:
1231112311 type_ = _expect_failure_type(for_failure=for_failure)
1231212312
@@ -12328,9 +12328,7 @@ def _create_text_set(
1232812328 return text
1232912329
1233012330
12331- def _create_text_null(
12332- lang: str, column: str | None, not_: bool = False, for_failure: bool = False
12333- ) -> str:
12331+ def _create_text_null(lang: str, column: str, not_: bool = False, for_failure: bool = False) -> str:
1233412332 type_ = _expect_failure_type(for_failure=for_failure)
1233512333
1233612334 column_text = _prep_column_text(column=column)
@@ -12347,9 +12345,7 @@ def _create_text_null(
1234712345 return text
1234812346
1234912347
12350- def _create_text_regex(
12351- lang: str, column: str | None, pattern: str, for_failure: bool = False
12352- ) -> str:
12348+ def _create_text_regex(lang: str, column: str, pattern: str, for_failure: bool = False) -> str:
1235312349 type_ = _expect_failure_type(for_failure=for_failure)
1235412350
1235512351 column_text = _prep_column_text(column=column)
@@ -12416,15 +12412,15 @@ def _create_text_rows_complete(
1241612412 return text
1241712413
1241812414
12419- def _create_text_row_count_match(lang: str, value: int , for_failure: bool = False) -> str:
12415+ def _create_text_row_count_match(lang: str, value: dict , for_failure: bool = False) -> str:
1242012416 type_ = _expect_failure_type(for_failure=for_failure)
1242112417
1242212418 values_text = _prep_values_text(value["count"], lang=lang)
1242312419
1242412420 return EXPECT_FAIL_TEXT[f"row_count_match_n_{type_}_text"][lang].format(values_text=values_text)
1242512421
1242612422
12427- def _create_text_col_count_match(lang: str, value: int , for_failure: bool = False) -> str:
12423+ def _create_text_col_count_match(lang: str, value: dict , for_failure: bool = False) -> str:
1242812424 type_ = _expect_failure_type(for_failure=for_failure)
1242912425
1243012426 values_text = _prep_values_text(value["count"], lang=lang)
@@ -12447,19 +12443,13 @@ def _create_text_specially(lang: str, for_failure: bool = False) -> str:
1244712443def _prep_column_text(column: str | list[str]) -> str:
1244812444 if isinstance(column, list):
1244912445 return "`" + str(column[0]) + "`"
12450- elif isinstance(column, str):
12446+ if isinstance(column, str):
1245112447 return "`" + column + "`"
12452- else:
12453- return ""
12448+ raise AssertionError
1245412449
1245512450
1245612451def _prep_values_text(
12457- values: str
12458- | int
12459- | float
12460- | datetime.datetime
12461- | datetime.date
12462- | list[str | int | float | datetime.datetime | datetime.date],
12452+ values: _CompliantValue | _CompliantValues,
1246312453 lang: str,
1246412454 limit: int = 3,
1246512455) -> str:
0 commit comments