hotfix: add module-level 'import re as _re' for _JR_* regex bundle
Browse filesThe judgment-reader regex constants (_JR_BRACKET_HEADER_RE etc.) reference
_re at module scope but _re was only imported inside functions. Module load
failed on HF with NameError. Local dev never caught this because uvicorn
auto-reload caches the partial module state.
tau_rag/api/fastapi_app.py
CHANGED
|
@@ -22679,6 +22679,7 @@ def doctrines_get_one(doctrine_id: str): # type: ignore
|
|
| 22679 |
# ──────────────────────────────────────────────────────────────────────
|
| 22680 |
|
| 22681 |
# Strip the same corpus prefix the hierarchical_graph uses.
|
|
|
|
| 22682 |
_JR_BRACKET_HEADER_RE = _re.compile(r"^(?:\s*\[[^\]]*\]\s*)+", flags=_re.UNICODE)
|
| 22683 |
_JR_PROSE_MARKER_RE = _re.compile(
|
| 22684 |
r"^\s*פסיק[הת]\s*[—–\-:]\s*[^:]+\)\s*:\s*", flags=_re.UNICODE)
|
|
|
|
| 22679 |
# ──────────────────────────────────────────────────────────────────────
|
| 22680 |
|
| 22681 |
# Strip the same corpus prefix the hierarchical_graph uses.
|
| 22682 |
+
import re as _re # module-level alias for the _JR_* regex bundle below
|
| 22683 |
_JR_BRACKET_HEADER_RE = _re.compile(r"^(?:\s*\[[^\]]*\]\s*)+", flags=_re.UNICODE)
|
| 22684 |
_JR_PROSE_MARKER_RE = _re.compile(
|
| 22685 |
r"^\s*פסיק[הת]\s*[—–\-:]\s*[^:]+\)\s*:\s*", flags=_re.UNICODE)
|