Default absent coordinates to 0 in retoken --check

What does this MR do and why?

I want retoken.py --check to read a missing coordinate the way SVG does, as 0. The grid check already tested the defaulted value, then indexed the attribute map by name to write its message, so a <circle> with cy and no cx raised KeyError: 'cx' once a group's translate put it off the 4px grid. The message now uses the same defaulted value and reads cx (absent, so 0). A CHANGELOG Fixed entry records it.

References

None.

Standards affected

None.

Exemption implications

None.

Test plan

  • just guard, just validate, just check REPO=$PWD, just build and just agent pass.
  • retoken.py --check over the 9 files in design/diagrams/templates/ reports each clean, as on main.
  • Before, on main's script: a plate with a circle (cy only) and a rect (y, no x) inside <g transform="translate(2 0)"> exits 1 with KeyError: 'cx'.
  • After, the same plate exits 1 with two findings and no traceback: grid: cx (absent, so 0) on <circle> at line 5 and grid: x (absent, so 0) on <rect> at line 5.
  • After, the same shapes with no group, and inside translate(4 0), exit 0 and report clean, as before.
  • Not tested: a <text> or <ellipse> with a missing coordinate. The grid check reads only rect, line, circle and ellipse, and ellipse shares the circle's code path.
  • Known limit: the kit has no fixtures or test runner, so the scratch plates are not committed.

An AI tool wrote this change and ran the checks above.

Merge request reports

Loading
Loading