Skip to content

Add JsonPatchPathNotFound to the type stubs - #252

Merged
stefankoegl merged 1 commit into
masterfrom
claude/zen-cori-24p0jo
Nov 3, 2026
Merged

stefankoegl merged 1 commit into
masterfrom
claude/zen-cori-24p0jo

Conversation

@stefankoegl

Copy link
Copy Markdown
Owner

stubtest failed on master because the exception added in #250 was
missing from jsonpatch-stubs/init.pyi.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PewzpjGk8XUYuEdhG8sXSD

stubtest failed on master because the exception added in #250 was
missing from jsonpatch-stubs/__init__.pyi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PewzpjGk8XUYuEdhG8sXSD

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the exception-stub update.

No open issues 🎉

What changed in this PR

Aligns the type stubs with the JsonPatchPathNotFound exception introduced in #250, addressing the reported stubtest failure.

Changes:

  • Declares JsonPatchPathNotFound as a subclass of JsonPatchConflict.
  • Adds type checks for catching the exception and assigning it to its parent type.
File Description
typetests/​usage.py Checks the new exception’s type and compatibility with JsonPatchConflict.
jsonpatch-stubs/​__init__.pyi Adds the missing exception declaration with matching inheritance.

Review effort: Balanced

@stefankoegl
stefankoegl merged commit 1392b0f into master Nov 3, 2026
13 checks passed
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — claude/zen-cori-24p0jo into master

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.

4 participants