-
Notifications
You must be signed in to change notification settings - Fork 4
feat!: Shot count is now represented as an unsigned 32-bit, up from 16-bit, allowing for higher shot counts #509
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
base: main
Are you sure you want to change the base?
Conversation
Shadow53
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a few u16s were missed, at least according to linting results.
crates/python/src/executable.rs
Outdated
| registers: Vec<String>, | ||
| parameters: Vec<PyParameter>, | ||
| #[pyo3(from_py_with = "crate::from_py::optional_non_zero_u16")] shots: Option<NonZeroU16>, | ||
| #[pyo3(from_py_with = "crate::from_py::optional_non_zero_u16")] shots: Option<NonZeroU32>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linting failure on crate::from_py::optional_non_zero_u16. Should probably be this?
| #[pyo3(from_py_with = "crate::from_py::optional_non_zero_u16")] shots: Option<NonZeroU32>, | |
| #[pyo3(from_py_with = "crate::from_py::optional_non_zero_u32")] shots: Option<NonZeroU32>, |
| #[setter] | ||
| pub fn set_trials(&mut self, trials: u16) -> PyResult<()> { | ||
| // `NonZeroU16` doesn't implement `PyClass`, so `pyo3` doesn't allow it to be used | ||
| // `NonZeroU32` doesn't implement `PyClass`, so `pyo3` doesn't allow it to be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like u16 is being used in this area (fn trials and fn set_trials) when it should be u32
(Commenting here because GH does not let me comment on non-diff lines)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also happens below in functions with the same names.
|
closes #332