Address PR #526 review feedback
Fix a real correctness bug flagged by three independent bots: Track's
whens/coords zip used strict=False, silently truncating data despite the
code's own comment stating they're mandatory pairs. Now strict=True.
Finish the Optional[X] -> X | None modernization for the handful of
TYPE_CHECKING-only forward references ruff safely declined to touch
(rewriting them unquoted would evaluate str.__or__ at def time and raise,
since these files don't use `from __future__ import annotations`); quote
the whole expression instead, matching the project's existing pattern for
forward refs.
Fix an uncaught IndexError in validator.handle_validation_error: an xpath
match list can legitimately come back empty without raising
XPathEvalError, so matches[0] could crash instead of falling back to the
element itself.
Restore the ~15 lines of [tool.pyrefly]/[tool.ty] config comments that
pre-commit.ci's pyprojectsort run silently stripped after the last push,
and add a `ci: skip: [pyprojectsort]` block so that keeps happening -
pyprojectsort has no option to preserve comments, so it stays useful
locally but is kept out of the bot's autofix path.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>