mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
refactor: drop the output-neutral pad on the executed-literal recursion
The call-detection restore splices into a fixed-position list, so its .ljust(end - start) holds that length invariant and a test guards it. The DML-scan recursion instead hands the undoubled literal to a fresh scan_region as its own region, whose length feeds nothing, so the pad only appends trailing spaces that shift no keyword and change no reported line. Drop it and the docstring clause that claimed it kept the offsets landing
This commit is contained in:
parent
422b24023c
commit
15d8f0b43c
1 changed files with 2 additions and 3 deletions
|
|
@ -633,8 +633,7 @@ def scan_region(
|
|||
always counted against the whole document, so a statement nested in a dollar-quoted body
|
||||
reports its real file line and lines up with the markers read from that file. A single-quoted
|
||||
literal that `DO` or `EXECUTE` runs as SQL is undoubled before it is scanned, so a `--` or `/*`
|
||||
in one of its nested strings blanks nothing and the statement after it stays visible, and it is
|
||||
padded back to its span so the offsets still land."""
|
||||
in one of its nested strings blanks nothing and the statement after it stays visible."""
|
||||
masked, bodies, literals = mask(region)
|
||||
executed = executed_names(masked)
|
||||
runnable = executed_literals(masked, literals, executed)
|
||||
|
|
@ -649,7 +648,7 @@ def scan_region(
|
|||
if base <= start and end <= commands_end:
|
||||
yield from scan_region(
|
||||
document,
|
||||
undouble(region[start:end]).ljust(end - start),
|
||||
undouble(region[start:end]),
|
||||
migration,
|
||||
markers,
|
||||
offset + start,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue