Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate the type of bounds and softbounds attributes for Range parameter types #824

Merged
merged 6 commits into from
Sep 16, 2023

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Aug 28, 2023

Fixes #660

Copy link
Member

@philippjfr philippjfr 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, thanks for all the tests!

if sv is None:
continue
self._validate_bound_type(sv, spos, 'softbound')

Copy link
Member

Choose a reason for hiding this comment

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

If you're changing the signature of this already, why not just change it to accept a bounds obj and a description, so that this code isn't duplicated? That way some future change to one of the code paths won't be missed on the other one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Refactored in 4a810ac, I'll let you merge if you're okay with the change.

@maximlt maximlt merged commit 12801c7 into main Sep 16, 2023
10 checks passed
@maximlt maximlt deleted the validate_range_bounds branch September 16, 2023 06:00
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.

param.Range does not check if values are numbers
3 participants