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.
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.
omg, how does mypy not catch this!?
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.
Pyo3 doesn't (yet) have support for auto-magic generation of a
.pyi
file so mypy doesn't actually have typing information available to know that set_recording_id doesn't take a type as an input.We could do this by hand but it's a fair bit of overhead: https://pyo3.rs/v0.16.4/python_typing_hints.html and would still be comparably error prone. The fact that we don't expose our native rust functions directly to end-users means the Python wrappers are effectively where we add our type-hinting information.
In theory pyo3 should have access to most of the information it needs to do this and folks are in fact actively working on making this a reality: PyO3/pyo3#2454