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

Fix call to set_recording_id #323

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Fix call to set_recording_id #323

merged 1 commit into from
Nov 21, 2022

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Nov 21, 2022

Simple argument error.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

@@ -80,7 +80,7 @@ def set_recording_id(value: str) -> None:
you will need to manually assign them all the same recording_id.
Any random UUIDv4 will work, or copy the recording id for the parent process.
"""
rerun_sdk.set_recording_id(str)
rerun_sdk.set_recording_id(value)
Copy link
Member

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!?

Copy link
Member Author

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

@jleibs jleibs marked this pull request as ready for review November 21, 2022 18:38
@jleibs jleibs merged commit d3fabe0 into main Nov 21, 2022
@jleibs jleibs deleted the jleibs/bugfix_set_recording_id branch November 21, 2022 20:45
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.

None yet

2 participants