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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rerun_py/rerun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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



def init(application_id: str) -> None:
Expand Down