Skip to content

Conversation

@dslavicek
Copy link

I was unable to run the quiz when numbers were not quoted, because they were interpreted as numbers and violated expected format somewhere.

I was unable to run the quiz when numbers were not quoted, because they were interpreted as numbers and violated expected format somewhere.
@dslavicek dslavicek linked an issue Feb 4, 2026 that may be closed by this pull request
Copy link
Contributor

@ZelenyMartin ZelenyMartin left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution with the fix! Unfortunately I'd go different way and allow users to use also non-string types in the answer field in YAML. Even that it semantically doesn't make sense to allow ints, floats and bools, we shouldn't limit it for the simplicity of creating a quiz in YAML.

I suggest that the Pydantic model should allow str | int | float | bool for this field, but we should immediately convert it to str.

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.

Linux quiz YAML is not valid

2 participants