Skip to content

Ensure .pop() and key inspection only occur for objects#257

Merged
mielvds merged 3 commits into
masterfrom
fix-compact-tm023
May 11, 2026
Merged

Ensure .pop() and key inspection only occur for objects#257
mielvds merged 3 commits into
masterfrom
fix-compact-tm023

Conversation

@mielvds
Copy link
Copy Markdown
Collaborator

@mielvds mielvds commented May 7, 2026

This PR fixes https://w3c.github.io/json-ld-api/tests/compact-manifest.html#tm023

Uses @none when compacted item is an IRI string

which would raise a AttributeError: 'str' object has no attribute 'pop'

The @type map compaction path now only calls .pop() and inspects keys when compacted_item is actually an object, so scalar compacted values like the location string fall through to @none. This prevents the AttributeError.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Base automatically changed from fix-compact-t0112 to master May 11, 2026 08:57
@mielvds mielvds force-pushed the fix-compact-tm023 branch from ff188e3 to 4377f59 Compare May 11, 2026 09:21
@mielvds mielvds merged commit f92aca2 into master May 11, 2026
16 checks passed
@mielvds mielvds deleted the fix-compact-tm023 branch May 11, 2026 09:22
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.

2 participants