Rebrand sexp → sx across web platform (173 files)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 11m37s

Rename all sexp directories, files, identifiers, and references to sx.
artdag/ excluded (separate media processing DSL).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 11:06:57 +00:00
parent 17cebe07e7
commit e8bc228c7f
174 changed files with 3126 additions and 2952 deletions

View File

@@ -78,15 +78,15 @@ async def fetch_fragment(
) -> str:
"""Fetch a fragment from another app.
Returns an HTML string or a ``SexpExpr`` (when the provider responds
with ``text/sexp``). When *required* is True (default), raises
Returns an HTML string or a ``SxExpr`` (when the provider responds
with ``text/sx``). When *required* is True (default), raises
``FragmentError`` on network errors or non-200 responses.
When *required* is False, returns ``""`` on failure.
Automatically returns ``""`` when called inside a fragment request
to prevent circular dependencies between apps.
"""
from shared.sexp.parser import SexpExpr
from shared.sx.parser import SxExpr
if _is_fragment_request():
return ""
@@ -102,8 +102,8 @@ async def fetch_fragment(
)
if resp.status_code == 200:
ct = resp.headers.get("content-type", "")
if "text/sexp" in ct:
return SexpExpr(resp.text)
if "text/sx" in ct:
return SxExpr(resp.text)
return resp.text
msg = f"Fragment {app_name}/{fragment_type} returned {resp.status_code}"
if required: