Skip to content

Implement PythonBool validator for mandatory, initial, scan for variables#41

Merged
BryceStevenWilley merged 3 commits into
mainfrom
pythonbool-validator
May 27, 2026
Merged

Implement PythonBool validator for mandatory, initial, scan for variables#41
BryceStevenWilley merged 3 commits into
mainfrom
pythonbool-validator

Conversation

@rajeswari1301
Copy link
Copy Markdown
Contributor

PythonBool was a stub class with no validation. This implements it to catch cases where attributes like mandatory, initial, and scan for variables are set to invalid values like numbers or non-Python strings. Added tests covering valid and invalid cases for all three attributes.

Valid values: True, False, or a Python expression like user_age > 18
Invalid values: numbers like 10, strings like "yes please", null

Copy link
Copy Markdown
Collaborator

@BryceStevenWilley BryceStevenWilley left a comment

Choose a reason for hiding this comment

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

Looks good to me, one small change to scan for variables needed, but the feature itself looks good!

Comment thread src/dayamlchecker/yaml_structure.py Outdated
@BryceStevenWilley BryceStevenWilley merged commit 57d4ad1 into main May 27, 2026
4 checks passed
@BryceStevenWilley BryceStevenWilley deleted the pythonbool-validator branch May 27, 2026 17:26
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