feat!: Shot count is now represented as an unsigned 32-bit, up from 16-bit, allowing for higher shot counts#509
Open
MarquessV wants to merge 6 commits into
Open
feat!: Shot count is now represented as an unsigned 32-bit, up from 16-bit, allowing for higher shot counts#509MarquessV wants to merge 6 commits into
MarquessV wants to merge 6 commits into
Conversation
Shadow53
requested changes
Oct 23, 2024
Shadow53
left a comment
Contributor
There was a problem hiding this comment.
Looks like a few u16s were missed, at least according to linting results.
| 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>, |
Contributor
There was a problem hiding this comment.
Linting failure on crate::from_py::optional_non_zero_u16. Should probably be this?
Suggested change
| #[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 |
Contributor
There was a problem hiding this comment.
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)
Contributor
There was a problem hiding this comment.
This also happens below in functions with the same names.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #332