As described in astral-sh/uv#12303, inline script metadata added naively to a multi-line string will be incorrectly detected as being actual inline script metadata when parsed in accordance with PEP 723 (since the parsing rules are written to be compatible with a basic regex instead of requiring a full Python parser).
Activity
brettcannon commented on Nov 2, 2026
I think it's fine to note the problem, but I think the solution is a bit too clever, niche, and too specific to parsing the AST.