Skip to content

Fix JSON Schema export for singleton sets - #360

Open
jakezwang wants to merge 1 commit into
keleshev:masterfrom
jakezwang:fix/json-schema-singleton-sets
Open

jakezwang wants to merge 1 commit into
keleshev:masterfrom
jakezwang:fix/json-schema-singleton-sets

Conversation

@jakezwang

Copy link
Copy Markdown

Use iteration to read the sole item of an iterable schema. Indexing currently raises TypeError for singleton set and frozenset schemas during json_schema() export.

Extends the existing array tests with set, frozenset, and tuple cases for both constants and types.

Validation: 130 tests passed on Python 3.10 and 3.14; pre-commit, sdist/wheel build, and Twine checks passed. The optional README doctest fails identically on pristine master (Regex flags on 3.10 and a stale expected error message on 3.14).

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