Skip to content

Move real/integer bounds attributes to properties #206

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

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

kroenlein
Copy link
Collaborator

This PR migrates the lower_bound and upper_bound attributes of IntegerBounds and RealBounds objects to properties, creating getters & setters and locating validation code in those subroutines. It also moves responsibility for verifying that required positional arguments were passed from an explicit default argument check to the compiler.

Technically breaking, since it migrates what was formerly a ValueError to a TypeError and adds setter constraints that were previously bypassed if the user modified objects. Such objects were already considered invalid by Citrine Platform.

This should represent no meaningful change in behavior.

anoto-moniz
anoto-moniz previously approved these changes Jan 10, 2024
Copy link
Contributor

@anoto-moniz anoto-moniz left a comment

Choose a reason for hiding this comment

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

Only comment is the one about unnecessary ordering, but it only impacts us, it's not a big deal if you wanna ignore it.

@kroenlein kroenlein merged commit ace426a into main Jan 11, 2024
@kroenlein kroenlein deleted the bugfix/exception-type-fix branch January 11, 2024 15:54
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