Skip to content

Handle source pointer objects in move location helpers - #237

Open
ice-pring wants to merge 1 commit into
stefankoegl:masterfrom
ice-pring:fix/from-pointer-location-helpers
Open

ice-pring wants to merge 1 commit into
stefankoegl:masterfrom
ice-pring:fix/from-pointer-location-helpers

Conversation

@ice-pring

Copy link
Copy Markdown

MoveOperation accepts a JsonPointer object in from, but its public source-location helpers try to parse that object as a string. Reading from_path or from_key, or changing the source with set_from_part(), therefore raises TypeError even though the operation can be applied.

Reuse _from_pointer() in those three places, as apply() already does. Added regressions for plain and custom pointer classes, including editing the source and applying the resulting move.

Validation:

  • The three added test methods produce six subtest errors before the fix; all eight source-location test methods pass afterward.
  • Windows CPython 3.12.14 and 3.14.5: each full example/doctest suite runs 217 tests with one platform skip, and all 20 Hypothesis property tests pass.
  • Ubuntu 24.04 / CPython 3.12.3: all 217 example/doctest tests and all 20 Hypothesis property tests pass, with no skips.
  • Source line and branch coverage: 100%.
  • Flake8 syntax/name checks and git diff --check pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant