simplibs-rules 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. {simplibs_rules-0.2.0/src/simplibs_rules.egg-info → simplibs_rules-0.2.2}/PKG-INFO +1 -1
  2. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/pyproject.toml +1 -1
  3. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/__init__.py +22 -1
  4. simplibs_rules-0.2.2/src/simplibs/rules/predicates/__init__.py +24 -0
  5. simplibs_rules-0.2.2/src/simplibs/rules/predicates/strings/IsIdentifier.py +100 -0
  6. simplibs_rules-0.2.2/src/simplibs/rules/predicates/strings/IsPrintable.py +99 -0
  7. simplibs_rules-0.2.2/src/simplibs/rules/predicates/strings/IsWhitespace.py +99 -0
  8. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/__init__.py +6 -0
  9. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/testing/assert_rule_contract.py +12 -6
  10. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/testing/asserts/assert_rule_build_exception.py +60 -14
  11. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2/src/simplibs_rules.egg-info}/PKG-INFO +1 -1
  12. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs_rules.egg-info/SOURCES.txt +3 -0
  13. simplibs_rules-0.2.0/src/simplibs/rules/predicates/__init__.py +0 -103
  14. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/LICENSE +0 -0
  15. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/README.md +0 -0
  16. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/setup.cfg +0 -0
  17. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/base_class/Rule.py +0 -0
  18. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/base_class/_NotARule.py +0 -0
  19. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/base_class/__init__.py +0 -0
  20. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/AllOf.py +0 -0
  21. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/AnyOf.py +0 -0
  22. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/Compose.py +0 -0
  23. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/ForEach.py +0 -0
  24. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/NoneOf.py +0 -0
  25. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/Not.py +0 -0
  26. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/__init__.py +0 -0
  27. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_helpers/__init__.py +0 -0
  28. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_helpers/as_predicate.py +0 -0
  29. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_helpers/build_child_exception.py +0 -0
  30. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_helpers/describe_rule.py +0 -0
  31. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_helpers/validations/__init__.py +0 -0
  32. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_helpers/validations/raise_invalid_predicate.py +0 -0
  33. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_init_validators/__init__.py +0 -0
  34. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_init_validators/raise_container_param_not_type_error.py +0 -0
  35. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_init_validators/raise_requires_at_least_one_rule_error.py +0 -0
  36. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_init_validators/raise_rule_param_not_callable.py +0 -0
  37. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/containers/_init_validators/validate_compose_param_is_callable.py +0 -0
  38. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_helpers/__init__.py +0 -0
  39. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_helpers/accepts_one_positional_argument.py +0 -0
  40. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_helpers/format_container.py +0 -0
  41. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/__init__.py +0 -0
  42. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/rule_errors/__init__.py +0 -0
  43. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/rule_errors/raise_has_length_param_conflict_error.py +0 -0
  44. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/rule_errors/raise_regex_param_invalid_pattern_error.py +0 -0
  45. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/rule_errors/raise_user_rule_param_wrong_arity.py +0 -0
  46. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/__init__.py +0 -0
  47. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/raise_param_min_max_bounds_inverted_error.py +0 -0
  48. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/raise_param_min_max_incomparable_error.py +0 -0
  49. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/raise_param_missing_error.py +0 -0
  50. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/raise_param_not_callable_error.py +0 -0
  51. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/raise_param_not_container_error.py +0 -0
  52. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/raise_param_not_non_negative_integer_error.py +0 -0
  53. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/raise_param_not_string_error.py +0 -0
  54. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_errors/raise_param_not_type_error.py +0 -0
  55. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_validators/__init__.py +0 -0
  56. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_validators/validate_param_is_integer.py +0 -0
  57. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_validators/validate_param_is_not_zero.py +0 -0
  58. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_validators/validate_param_is_primitive_number.py +0 -0
  59. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/_init_validators/shared_validators/validate_param_remainder_in_range.py +0 -0
  60. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/arithmetic/CloseTo.py +0 -0
  61. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/arithmetic/DivisibleBy.py +0 -0
  62. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/arithmetic/HasRemainder.py +0 -0
  63. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/arithmetic/__init__.py +0 -0
  64. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/checkers/IsEmpty.py +0 -0
  65. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/checkers/IsFalse.py +0 -0
  66. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/checkers/IsNone.py +0 -0
  67. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/checkers/IsTrue.py +0 -0
  68. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/checkers/NotEmpty.py +0 -0
  69. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/checkers/__init__.py +0 -0
  70. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/collections/AllUnique.py +0 -0
  71. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/collections/HasItem.py +0 -0
  72. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/collections/HasKey.py +0 -0
  73. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/collections/HasKeys.py +0 -0
  74. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/collections/IsContainer.py +0 -0
  75. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/collections/IsSubsetOf.py +0 -0
  76. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/collections/IsSupersetOf.py +0 -0
  77. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/collections/__init__.py +0 -0
  78. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/comparisons/Equals.py +0 -0
  79. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/comparisons/GreaterOrEqual.py +0 -0
  80. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/comparisons/GreaterThan.py +0 -0
  81. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/comparisons/InRange.py +0 -0
  82. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/comparisons/LessOrEqual.py +0 -0
  83. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/comparisons/LessThan.py +0 -0
  84. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/comparisons/NotEquals.py +0 -0
  85. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/comparisons/__init__.py +0 -0
  86. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/HasAttribute.py +0 -0
  87. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/HasLength.py +0 -0
  88. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/IsCallable.py +0 -0
  89. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/IsDataclass.py +0 -0
  90. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/IsHashable.py +0 -0
  91. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/IsInstance.py +0 -0
  92. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/IsIterable.py +0 -0
  93. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/IsSubclass.py +0 -0
  94. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/IsType.py +0 -0
  95. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/introspection/__init__.py +0 -0
  96. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/logic/Is.py +0 -0
  97. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/logic/IsIn.py +0 -0
  98. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/logic/IsNot.py +0 -0
  99. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/logic/NotIn.py +0 -0
  100. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/logic/UserRule.py +0 -0
  101. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/logic/__init__.py +0 -0
  102. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsBool.py +0 -0
  103. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsDecimal.py +0 -0
  104. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsEven.py +0 -0
  105. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsFinite.py +0 -0
  106. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsFloat.py +0 -0
  107. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsInfinity.py +0 -0
  108. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsInteger.py +0 -0
  109. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsNan.py +0 -0
  110. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsNumber.py +0 -0
  111. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsOdd.py +0 -0
  112. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsPi.py +0 -0
  113. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsPrimitiveNumber.py +0 -0
  114. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/IsZero.py +0 -0
  115. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/numeric/__init__.py +0 -0
  116. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/Contains.py +0 -0
  117. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/EndsWith.py +0 -0
  118. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsAlnum.py +0 -0
  119. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsAlpha.py +0 -0
  120. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsAscii.py +0 -0
  121. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsBlank.py +0 -0
  122. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsDigitString.py +0 -0
  123. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsLowercase.py +0 -0
  124. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsString.py +0 -0
  125. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsSubstringOf.py +0 -0
  126. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsTitlecase.py +0 -0
  127. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/IsUppercase.py +0 -0
  128. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/NotBlank.py +0 -0
  129. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/Regex.py +0 -0
  130. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/strings/StartsWith.py +0 -0
  131. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/IsAny.py +0 -0
  132. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/IsTyping.py +0 -0
  133. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/__init__.py +0 -0
  134. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/ORIGIN_TABLE.py +0 -0
  135. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/__init__.py +0 -0
  136. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/build_annotated_rule.py +0 -0
  137. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/build_any_of_rule.py +0 -0
  138. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/build_callable_rule.py +0 -0
  139. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/build_elements_rule.py +0 -0
  140. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/build_key_value_rule.py +0 -0
  141. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/build_literal_rule.py +0 -0
  142. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/build_tuple_rule.py +0 -0
  143. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_builders/build_type_rule.py +0 -0
  144. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_validations/__init__.py +0 -0
  145. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/_validations/raise_unsupported_annotation_error.py +0 -0
  146. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/build_typing_rule.py +0 -0
  147. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/tools/__init__.py +0 -0
  148. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/tools/get_supported_origins.py +0 -0
  149. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/predicates/typing/tools/is_supported_annotation.py +0 -0
  150. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/testing/__init__.py +0 -0
  151. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/testing/asserts/__init__.py +0 -0
  152. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/testing/asserts/assert_rule_is_valid.py +0 -0
  153. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/testing/asserts/assert_rule_param_error.py +0 -0
  154. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs/rules/testing/asserts/assert_rule_validate.py +0 -0
  155. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs_rules.egg-info/dependency_links.txt +0 -0
  156. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs_rules.egg-info/requires.txt +0 -0
  157. {simplibs_rules-0.2.0 → simplibs_rules-0.2.2}/src/simplibs_rules.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simplibs-rules
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Composable, explicit validation rules — pure predicates, zero transformation.
5
5
  Author-email: "Dalibor Sova (Sudip2708)" <daliborsova@seznam.cz>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simplibs-rules"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "Composable, explicit validation rules — pure predicates, zero transformation."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -106,7 +106,10 @@ from .predicates.strings import (
106
106
  IsAscii,
107
107
  IsLowercase,
108
108
  IsUppercase,
109
- IsTitlecase
109
+ IsTitlecase,
110
+ IsIdentifier,
111
+ IsPrintable,
112
+ IsWhitespace,
110
113
  )
111
114
 
112
115
  # Predicates — typing
@@ -238,6 +241,9 @@ is_ascii = IsAscii()
238
241
  is_lowercase = IsLowercase()
239
242
  is_uppercase = IsUppercase()
240
243
  is_titlecase = IsTitlecase()
244
+ is_identifier = IsIdentifier()
245
+ is_printable = IsPrintable()
246
+ is_whitespace = IsWhitespace()
241
247
 
242
248
  # ---- predicates/typing -------------------------------------------------------
243
249
 
@@ -343,6 +349,9 @@ rule_class = SimpleNamespace(
343
349
  IsLowercase=IsLowercase,
344
350
  IsUppercase=IsUppercase,
345
351
  IsTitlecase=IsTitlecase,
352
+ IsIdentifier=IsIdentifier,
353
+ IsPrintable=IsPrintable,
354
+ IsWhitespace=IsWhitespace,
346
355
 
347
356
  # typing
348
357
  IsAny=IsAny,
@@ -455,6 +464,9 @@ rules = SimpleNamespace(
455
464
  is_lowercase=is_lowercase,
456
465
  is_uppercase=is_uppercase,
457
466
  is_titlecase=is_titlecase,
467
+ is_identifier=is_identifier,
468
+ is_printable=is_printable,
469
+ is_whitespace=is_whitespace,
458
470
 
459
471
  # typing
460
472
  always_false=always_false,
@@ -559,6 +571,9 @@ __all__ = [
559
571
  "IsLowercase",
560
572
  "IsUppercase",
561
573
  "IsTitlecase",
574
+ "IsIdentifier",
575
+ "IsPrintable",
576
+ "IsWhitespace",
562
577
 
563
578
  # typing
564
579
  "IsAny",
@@ -648,6 +663,9 @@ __all__ = [
648
663
  "is_lowercase",
649
664
  "is_uppercase",
650
665
  "is_titlecase",
666
+ "is_identifier",
667
+ "is_printable",
668
+ "is_whitespace",
651
669
  "is_typing",
652
670
  "always_false",
653
671
  "always_true",
@@ -918,6 +936,9 @@ are compound names rather than the keywords themselves.
918
936
  | `regex` | `pattern` | Regex search finds a match in the string. |
919
937
  | `starts_with` | `prefix` | Value starts with the prefix. |
920
938
  | `is_substring_of` | `target_string` | String value must be a substring of a target string. |
939
+ | `is_identifier` | — | String is a valid Python identifier. |
940
+ | `is_printable` | — | String consists entirely of printable characters. |
941
+ | `is_whitespace` | — | String consists entirely of whitespace (non-empty). |
921
942
 
922
943
 
923
944
  ### `typing/`
@@ -0,0 +1,24 @@
1
+ _DESIGN_NOTES = """
2
+ # Predicates Sub-Package
3
+
4
+ ## Purpose
5
+ Root registry and re-export point for all single-purpose atomic rules (predicates).
6
+ Predicates represent single, non-composite assertions evaluated directly against an
7
+ input value or its structural properties.
8
+
9
+ ## Sub-Packages Registry
10
+
11
+ | Sub-Package | Focus Area / Responsibility |
12
+ | :----------------- | :---------------------------------------------------------------------------------- |
13
+ | `arithmetic` | Mathematical calculations and properties (tolerances, divisibility, remainders). |
14
+ | `checkers` | Parameterless boolean, identity, and emptiness state assertions. |
15
+ | `collections` | Structure and contents of containers, sets, sequences, and mappings. |
16
+ | `comparisons` | Value-based relational operators (equality, inequality, order, numeric ranges). |
17
+ | `introspection` | Structural inspection of types, interfaces, attributes, callable states, and `len`. |
18
+ | `logic` | Core identity (`is`) and collection membership (`in`) assertions with strict flags. |
19
+ | `numeric` | Specific numeric domain type checks, non-finite values (`NaN`, `inf`), and `bool`. |
20
+ | `strings` | Textual contents, pattern matching, prefix/suffix checks, and whitespace states. |
21
+ | `_helpers` | Internal shared utilities for diagnostic rendering and predicate calculation logic. |
22
+ | `_init_validators` | Internal constructor assertion routines ensuring valid parameter boundaries. |
23
+
24
+ """
@@ -0,0 +1,100 @@
1
+ from typing import Any
2
+ from simplibs.exception import ValidationError
3
+ # Outers
4
+ from ...base_class import Rule
5
+
6
+
7
+ class IsIdentifier(Rule):
8
+ """String value must be a valid Python identifier.
9
+
10
+ Rule:
11
+ value.isidentifier()
12
+
13
+ Example:
14
+ validate(value, IsIdentifier())
15
+ """
16
+
17
+ __slots__ = ()
18
+
19
+ # ----------------------------------------------------------------------
20
+ # Rule definition
21
+ # ----------------------------------------------------------------------
22
+ def is_valid(self, value: Any) -> bool:
23
+
24
+ # 1. Evaluate the type and identifier validity
25
+ return (
26
+
27
+ # 1.1 Check that the value is of type str
28
+ isinstance(value, str)
29
+
30
+ # 1.2 Check that the value is a valid Python identifier
31
+ and value.isidentifier()
32
+ )
33
+
34
+ # ----------------------------------------------------------------------
35
+ # Exception definition
36
+ # ----------------------------------------------------------------------
37
+ def build_exception(
38
+ self,
39
+ value: Any,
40
+ value_name: str | None = None,
41
+ context: str | None = None,
42
+ ) -> Exception:
43
+
44
+ # 1. Prepare data
45
+ # 1.1 When value is not a string
46
+ if not isinstance(value, str):
47
+ problem = f"Value {value!r} of type '{type(value).__name__}' is not a string."
48
+ how_to_fix = "Provide a string value."
49
+ exception_type = TypeError
50
+
51
+ # 1.2 When the string is not a valid Python identifier
52
+ else:
53
+ problem = f"Value {value!r} is not a valid Python identifier."
54
+ how_to_fix = "Provide a valid Python identifier string (e.g. 'my_var', 'foo1')."
55
+ exception_type = ValueError
56
+
57
+ # 2. Build the exception
58
+ return ValidationError(
59
+ error_name="IS_IDENTIFIER_ERROR",
60
+ label=value_name,
61
+ expected="a valid Python identifier string",
62
+ value=value,
63
+ problem=problem,
64
+ context=context,
65
+ how_to_fix=how_to_fix,
66
+ exception=exception_type,
67
+ )
68
+
69
+
70
+ # ----------------------------------------------------------------------
71
+ # Helper function for internal validation across the project
72
+ # ----------------------------------------------------------------------
73
+ is_identifier = IsIdentifier().is_valid
74
+
75
+
76
+ _DESIGN_NOTES = """
77
+ # IsIdentifier — Python Identifier Validation Rule
78
+
79
+ ## Purpose
80
+ The `IsIdentifier` rule validates that a string is a valid Python identifier
81
+ via Python's native `str.isidentifier()`.
82
+
83
+ ---
84
+
85
+ ## 1. Execution Rationale & Safeguards
86
+
87
+ * **Unicode-Aware:**
88
+ `str.isidentifier()` follows Python 3 rules for valid identifiers, including
89
+ Unicode characters valid in variable names.
90
+ * **Empty String & Keywords:**
91
+ `"".isidentifier()` returns `False`. Python language keywords (like `def`, `class`)
92
+ return `True` under `str.isidentifier()`.
93
+
94
+ ---
95
+
96
+ ## 2. Exception Card Design
97
+
98
+ * **Dual Diagnostic Path:** `TypeError` when the value isn't a string at all;
99
+ `ValueError` (`IS_IDENTIFIER_ERROR`) when it is a string but fails the identifier check.
100
+ """
@@ -0,0 +1,99 @@
1
+ from typing import Any
2
+ from simplibs.exception import ValidationError
3
+ # Outers
4
+ from ...base_class import Rule
5
+
6
+
7
+ class IsPrintable(Rule):
8
+ """String value must consist entirely of printable characters.
9
+
10
+ Rule:
11
+ value.isprintable()
12
+
13
+ Example:
14
+ validate(value, IsPrintable())
15
+ """
16
+
17
+ __slots__ = ()
18
+
19
+ # ----------------------------------------------------------------------
20
+ # Rule definition
21
+ # ----------------------------------------------------------------------
22
+ def is_valid(self, value: Any) -> bool:
23
+
24
+ # 1. Evaluate the type and printable content
25
+ return (
26
+
27
+ # 1.1 Check that the value is of type str
28
+ isinstance(value, str)
29
+
30
+ # 1.2 Check that every character is printable (accepts empty string "")
31
+ and value.isprintable()
32
+ )
33
+
34
+ # ----------------------------------------------------------------------
35
+ # Exception definition
36
+ # ----------------------------------------------------------------------
37
+ def build_exception(
38
+ self,
39
+ value: Any,
40
+ value_name: str | None = None,
41
+ context: str | None = None,
42
+ ) -> Exception:
43
+
44
+ # 1. Prepare data
45
+ # 1.1 When value is not a string
46
+ if not isinstance(value, str):
47
+ problem = f"Value {value!r} of type '{type(value).__name__}' is not a string."
48
+ how_to_fix = "Provide a string value."
49
+ exception_type = TypeError
50
+
51
+ # 1.2 When the string contains unprintable characters
52
+ else:
53
+ problem = f"Value {value!r} contains unprintable or control characters."
54
+ how_to_fix = "Provide a string containing only printable characters."
55
+ exception_type = ValueError
56
+
57
+ # 2. Build the exception
58
+ return ValidationError(
59
+ error_name="IS_PRINTABLE_ERROR",
60
+ label=value_name,
61
+ expected="a printable string (no control characters)",
62
+ value=value,
63
+ problem=problem,
64
+ context=context,
65
+ how_to_fix=how_to_fix,
66
+ exception=exception_type,
67
+ )
68
+
69
+
70
+ # ----------------------------------------------------------------------
71
+ # Helper function for internal validation across the project
72
+ # ----------------------------------------------------------------------
73
+ is_printable = IsPrintable().is_valid
74
+
75
+
76
+ _DESIGN_NOTES = """
77
+ # IsPrintable — Printable String Validation Rule
78
+
79
+ ## Purpose
80
+ The `IsPrintable` rule validates that a string consists entirely of printable
81
+ characters via Python's native `str.isprintable()`.
82
+
83
+ ---
84
+
85
+ ## 1. Execution Rationale & Safeguards
86
+
87
+ * **Empty String Accepted:**
88
+ `"".isprintable()` returns `True` in Python.
89
+ * **Control Characters Rejected:**
90
+ Characters considered non-printable (such as unescaped control codes like `\x00`)
91
+ will cause validation to fail.
92
+
93
+ ---
94
+
95
+ ## 2. Exception Card Design
96
+
97
+ * **Dual Diagnostic Path:** `TypeError` when the value isn't a string at all;
98
+ `ValueError` (`IS_PRINTABLE_ERROR`) when it is a string but contains unprintable characters.
99
+ """
@@ -0,0 +1,99 @@
1
+ from typing import Any
2
+ from simplibs.exception import ValidationError
3
+ # Outers
4
+ from ...base_class import Rule
5
+
6
+
7
+ class IsWhitespace(Rule):
8
+ """String value must consist entirely of whitespace characters.
9
+
10
+ Rule:
11
+ value.isspace()
12
+
13
+ Example:
14
+ validate(value, IsWhitespace())
15
+ """
16
+
17
+ __slots__ = ()
18
+
19
+ # ----------------------------------------------------------------------
20
+ # Rule definition
21
+ # ----------------------------------------------------------------------
22
+ def is_valid(self, value: Any) -> bool:
23
+
24
+ # 1. Evaluate the type and whitespace content
25
+ return (
26
+
27
+ # 1.1 Check that the value is of type str
28
+ isinstance(value, str)
29
+
30
+ # 1.2 Check that every character is whitespace (also rejects "")
31
+ and value.isspace()
32
+ )
33
+
34
+ # ----------------------------------------------------------------------
35
+ # Exception definition
36
+ # ----------------------------------------------------------------------
37
+ def build_exception(
38
+ self,
39
+ value: Any,
40
+ value_name: str | None = None,
41
+ context: str | None = None,
42
+ ) -> Exception:
43
+
44
+ # 1. Prepare data
45
+ # 1.1 When value is not a string
46
+ if not isinstance(value, str):
47
+ problem = f"Value {value!r} of type '{type(value).__name__}' is not a string."
48
+ how_to_fix = "Provide a string value."
49
+ exception_type = TypeError
50
+
51
+ # 1.2 When the string contains non-whitespace characters (or is empty)
52
+ else:
53
+ problem = f"Value {value!r} contains non-whitespace characters or is empty."
54
+ how_to_fix = "Provide a non-empty string consisting only of whitespace characters."
55
+ exception_type = ValueError
56
+
57
+ # 2. Build the exception
58
+ return ValidationError(
59
+ error_name="IS_WHITESPACE_ERROR",
60
+ label=value_name,
61
+ expected="a non-empty, purely whitespace string",
62
+ value=value,
63
+ problem=problem,
64
+ context=context,
65
+ how_to_fix=how_to_fix,
66
+ exception=exception_type,
67
+ )
68
+
69
+
70
+ # ----------------------------------------------------------------------
71
+ # Helper function for internal validation across the project
72
+ # ----------------------------------------------------------------------
73
+ is_whitespace = IsWhitespace().is_valid
74
+
75
+
76
+ _DESIGN_NOTES = """
77
+ # IsWhitespace — Whitespace String Validation Rule
78
+
79
+ ## Purpose
80
+ The `IsWhitespace` rule validates that a string consists entirely of whitespace
81
+ characters via Python's native `str.isspace()`.
82
+
83
+ ---
84
+
85
+ ## 1. Execution Rationale & Safeguards
86
+
87
+ * **Empty String Rejected:**
88
+ `"".isspace()` returns `False` in Python — this rule inherits that behavior directly.
89
+ * **Unicode Whitespace:**
90
+ `str.isspace()` accepts spaces, tabs (`\t`), newlines (`\n`), carriage returns (`\r`),
91
+ and all Unicode whitespace characters.
92
+
93
+ ---
94
+
95
+ ## 2. Exception Card Design
96
+
97
+ * **Dual Diagnostic Path:** `TypeError` when the value isn't a string at all;
98
+ `ValueError` (`IS_WHITESPACE_ERROR`) when it is a string but fails the whitespace check.
99
+ """
@@ -13,6 +13,9 @@ from .IsAscii import IsAscii
13
13
  from .IsLowercase import IsLowercase
14
14
  from .IsUppercase import IsUppercase
15
15
  from .IsTitlecase import IsTitlecase
16
+ from .IsIdentifier import IsIdentifier, is_identifier
17
+ from .IsPrintable import IsPrintable, is_printable
18
+ from .IsWhitespace import IsWhitespace, is_whitespace
16
19
 
17
20
 
18
21
  _DESIGN_NOTES = """
@@ -41,4 +44,7 @@ and affix checks, and blank/non-blank content checks.
41
44
  | `IsLowercase` | Class | String must be entirely lowercase (with at least one cased character). |
42
45
  | `IsUppercase` | Class | String must be entirely uppercase (with at least one cased character). |
43
46
  | `IsTitlecase` | Class | String must be title-cased. |
47
+ | `IsIdentifier` | Class | String must be a valid Python identifier. |
48
+ | `IsPrintable` | Class | String must consist entirely of printable characters. |
49
+ | `IsWhitespace` | Class | String must consist entirely of whitespace characters (non-empty). |
44
50
  """
@@ -1,11 +1,11 @@
1
- from typing import Any, Callable
1
+ from typing import Any, Callable, Sequence
2
2
  # Outers
3
3
  from ..base_class import Rule
4
4
  # Inners
5
- from .asserts.assert_rule_is_valid import assert_rule_is_valid
6
- from .asserts.assert_rule_validate import assert_rule_validate
7
5
  from .asserts.assert_rule_build_exception import assert_rule_build_exception
6
+ from .asserts.assert_rule_is_valid import assert_rule_is_valid
8
7
  from .asserts.assert_rule_param_error import assert_rule_param_error
8
+ from .asserts.assert_rule_validate import assert_rule_validate
9
9
 
10
10
 
11
11
  def assert_rule_contract(
@@ -14,8 +14,8 @@ def assert_rule_contract(
14
14
  valid_values: list[Any],
15
15
  invalid_values: list[Any],
16
16
  *,
17
- expected_error_name: str | None = None,
18
- expected_exception_type: type[Exception] | None = None,
17
+ expected_error_name: str | Sequence[str | None] | None = None,
18
+ expected_exception_type: type[Exception] | Sequence[type[Exception] | None] | None = None,
19
19
  rule_factory: Callable[..., Any] | None = None,
20
20
  invalid_init_params: list[tuple[tuple[Any, ...], dict[str, Any]]] | None = None,
21
21
  sample_label: str = "target_var",
@@ -108,7 +108,8 @@ every deterministic corner of the `Rule` contract.
108
108
  1. **`is_valid` check** — `is_valid()` / `__call__` boolean contract.
109
109
  2. **`validate` check** — the `validate()` mode matrix (raise / return_value / return_bool).
110
110
  3. **`build_exception` check** — `build_exception()` produces a well-formed, raisable card.
111
- Supports `check_value=False` for transformation rules (e.g. `Compose`).
111
+ Supports `check_value=False` for transformation rules (e.g. `Compose`) and accepts either
112
+ scalar expected error details or sequences index-matched to `invalid_values`.
112
113
  4. **constructor `ParamError` check** (opt-in via `rule_factory` +
113
114
  `invalid_init_params`) — the constructor rejects bad configuration with `ParamError`.
114
115
 
@@ -134,6 +135,11 @@ worth misuse-testing (e.g. `IsNone`, `IsTrue`).
134
135
  (built from `intro` and the rule's class name) passed as `intro` into
135
136
  every delegated call is what provides the grouping/readability benefit,
136
137
  without a redundant, effectively-always-green wrapper subtest.
138
+ * **Flexible Diagnostic Card Matching:**
139
+ `expected_error_name` and `expected_exception_type` pass straight through to
140
+ `assert_rule_build_exception`. Accepting `Sequence` allows callers testing compound
141
+ rules (like `AllOf` or `AnyOf`) to supply distinct expected error names or wrapper exceptions
142
+ for each respective item in `invalid_values`.
137
143
  * **`deep_check` Scope:**
138
144
  Gates both the exhaustive diagnostic-field inspection inside
139
145
  `build_exception` checking and the optional constructor `ParamError`
@@ -1,6 +1,6 @@
1
- from typing import Any
2
- from simplibs.exception.testing import assert_exception_function, maybe_subtest
1
+ from typing import Any, Sequence
3
2
  from simplibs.exception import ValidationError
3
+ from simplibs.exception.testing import assert_exception_function, maybe_subtest
4
4
  # Outers
5
5
  from ...base_class import Rule
6
6
 
@@ -11,8 +11,8 @@ def assert_rule_build_exception(
11
11
  rule: Rule,
12
12
  invalid_values: list[Any],
13
13
  *,
14
- expected_error_name: str | None = None,
15
- expected_exception_type: type[Exception] | None = None,
14
+ expected_error_name: str | Sequence[str | None] | None = None,
15
+ expected_exception_type: type[Exception] | Sequence[type[Exception] | None] | None = None,
16
16
  sample_label: str = "target_var",
17
17
  sample_context: str = "test_execution_context",
18
18
  check_value: bool = True,
@@ -26,8 +26,12 @@ def assert_rule_build_exception(
26
26
  subtests: The native pytest subtests fixture manager instance.
27
27
  rule: The Rule instance under test.
28
28
  invalid_values: Values expected to produce a diagnostic exception card.
29
- expected_error_name: If provided, asserted against exc.error_name for every value.
30
- expected_exception_type: If provided, asserted against exc.exception for every value.
29
+ expected_error_name: If provided, asserted against exc.error_name. Can be
30
+ a single string (applied to all values) or a sequence matching invalid_values
31
+ by index.
32
+ expected_exception_type: If provided, asserted against exc.exception. Can be
33
+ a single Exception class (applied to all values) or a sequence matching
34
+ invalid_values by index.
31
35
  sample_label: The value_name passed into build_exception() for every check.
32
36
  sample_context: The context passed into build_exception() for every check.
33
37
  check_value: If True, asserts that exc.value strictly matches the raw invalid value.
@@ -59,10 +63,36 @@ def assert_rule_build_exception(
59
63
  if check_value:
60
64
  kwargs["value"] = val
61
65
 
66
+ # 1. Per-index evaluation of expected_error_name with sequence length guard
62
67
  if expected_error_name is not None:
63
- kwargs["error_name"] = expected_error_name
68
+ if isinstance(expected_error_name, Sequence) and not isinstance(expected_error_name, str):
69
+ if len(expected_error_name) != len(invalid_values):
70
+ raise ValueError(
71
+ "expected_error_name sequence must have the same length as invalid_values."
72
+ )
73
+ current_error_name = expected_error_name[index]
74
+ else:
75
+ current_error_name = expected_error_name
76
+
77
+ if current_error_name is not None:
78
+ kwargs["error_name"] = current_error_name
79
+
80
+ # 2. Per-index evaluation of expected_exception_type with sequence length guard
64
81
  if expected_exception_type is not None:
65
- kwargs["exception"] = expected_exception_type
82
+ if (
83
+ isinstance(expected_exception_type, Sequence)
84
+ and not isinstance(expected_exception_type, type)
85
+ ):
86
+ if len(expected_exception_type) != len(invalid_values):
87
+ raise ValueError(
88
+ "expected_exception_type sequence must have the same length as invalid_values."
89
+ )
90
+ current_exception_type = expected_exception_type[index]
91
+ else:
92
+ current_exception_type = expected_exception_type
93
+
94
+ if current_exception_type is not None:
95
+ kwargs["exception"] = current_exception_type
66
96
 
67
97
  exc = assert_exception_function(
68
98
  subtests,
@@ -109,11 +139,11 @@ re-implementing raise/type/field checking here.
109
139
  * **Basic Metadata via `assert_exception_function`:**
110
140
  Delegates the type check (`ValidationError`), and the `label`/`context`/
111
141
  `value` echo-back checks, to `assert_exception_function`.
112
- * **Optional Strict Fields:**
113
- `expected_error_name` and `expected_exception_type` are opt-in — when
114
- the calling test knows a rule's fixed `error_name` or wrapped
115
- `exception` class, it can assert them across every invalid value in one
116
- call.
142
+ * **Flexible Expected Fields (Scalar vs Sequence):**
143
+ `expected_error_name` and `expected_exception_type` support both single values
144
+ (applied uniformly across all `invalid_values`) and index-matched `Sequence`s
145
+ (for compound rules like `AllOf`/`AnyOf` where different invalid inputs trigger
146
+ different sub-rule failures).
117
147
  * **Value Echo Bypass (`check_value=False`):**
118
148
  Rules that transform values before evaluating inner bounds (such as `Compose`)
119
149
  will legitimately report the *transformed* value inside `exc.value` instead
@@ -130,7 +160,23 @@ re-implementing raise/type/field checking here.
130
160
 
131
161
  ---
132
162
 
133
- ## 2. Fixed Bug: deep_check Was Silently Disabling All Field Checks
163
+ ## 2. Sequence Handling & Boundary Guards
164
+
165
+ * **`str` and `type` Exclusion:**
166
+ Python's `str` implements `Sequence`, and custom exception classes (`type`)
167
+ may occasionally match sequence protocols. The checks explicitly exclude
168
+ `str` (`not isinstance(val, str)`) and `type` (`not isinstance(val, type)`) to
169
+ prevent strings from being iterated as character sequences or classes from being
170
+ misinterpreted as multi-item inputs.
171
+ * **Fail-Fast Length Validation:**
172
+ When a sequence is provided for expected errors or types, its length must
173
+ strictly equal `len(invalid_values)`. An early `ValueError` is raised before
174
+ entering the subtest execution loop, avoiding confusing downstream `IndexError`
175
+ exceptions inside individual test checkpoints.
176
+
177
+ ---
178
+
179
+ ## 3. Fixed Bug: deep_check Was Silently Disabling All Field Checks
134
180
 
135
181
  An earlier revision passed `deep_check=False` straight through to the
136
182
  delegated `assert_exception_function` call, tying it to this function's
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simplibs-rules
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Composable, explicit validation rules — pure predicates, zero transformation.
5
5
  Author-email: "Dalibor Sova (Sudip2708)" <daliborsova@seznam.cz>
6
6
  License-Expression: MIT
@@ -109,11 +109,14 @@ src/simplibs/rules/predicates/strings/IsAlpha.py
109
109
  src/simplibs/rules/predicates/strings/IsAscii.py
110
110
  src/simplibs/rules/predicates/strings/IsBlank.py
111
111
  src/simplibs/rules/predicates/strings/IsDigitString.py
112
+ src/simplibs/rules/predicates/strings/IsIdentifier.py
112
113
  src/simplibs/rules/predicates/strings/IsLowercase.py
114
+ src/simplibs/rules/predicates/strings/IsPrintable.py
113
115
  src/simplibs/rules/predicates/strings/IsString.py
114
116
  src/simplibs/rules/predicates/strings/IsSubstringOf.py
115
117
  src/simplibs/rules/predicates/strings/IsTitlecase.py
116
118
  src/simplibs/rules/predicates/strings/IsUppercase.py
119
+ src/simplibs/rules/predicates/strings/IsWhitespace.py
117
120
  src/simplibs/rules/predicates/strings/NotBlank.py
118
121
  src/simplibs/rules/predicates/strings/Regex.py
119
122
  src/simplibs/rules/predicates/strings/StartsWith.py