mmar-mapi 1.0.20__tar.gz → 1.0.21__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.

Potentially problematic release.


This version of mmar-mapi might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmar-mapi
3
- Version: 1.0.20
3
+ Version: 1.0.21
4
4
  Summary: Common pure/IO utilities for multi-modal architectures team
5
5
  Keywords:
6
6
  Author: Eugene Tagin
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "mmar-mapi"
3
3
  # dynamic version is not supported yet on uv_build
4
- version = "1.0.20"
4
+ version = "1.0.21"
5
5
  description = "Common pure/IO utilities for multi-modal architectures team"
6
6
  authors = [{name = "Eugene Tagin", email = "tagin@airi.net"}]
7
7
  license = "MIT"
@@ -71,7 +71,13 @@ class TextExtractorAPI:
71
71
  raise NotImplementedError
72
72
 
73
73
 
74
- PageRange = Annotated[tuple[int, int], AfterValidator(lambda rng: rng[0] <= rng[1])]
74
+ def _validate_page_range(v: tuple[int, int]) -> tuple[int, int]:
75
+ if v[0] < 1 or v[1] < v[0]:
76
+ raise ValueError("Invalid page range: start must be ≥ 1 and end must be ≥ start.")
77
+ return v
78
+
79
+
80
+ PageRange = Annotated[tuple[int, int], AfterValidator(_validate_page_range)]
75
81
  ForceOCR = StrEnum("ForceOCR", ["ENABLED", "DISABLED", "AUTO"])
76
82
  OutputType = StrEnum("OutputType", ["RAW", "PLAIN", "MARKDOWN"])
77
83
 
File without changes
File without changes