Skip to content

Fix several typing annotations in the SDK and run mypy on snippets #9260

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

Merged
merged 6 commits into from
Mar 13, 2025

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Mar 11, 2025

Related

What

Snippets, a key aspect of our documentation, were not typed checked by mypy so far... 😱 No longer. This lead to several fixes in user-facing typing annotation in the python SDK. Plus the usual load of fixes in the snippets themselves.

Note: snippets that are "not runnable" (as per snippets.toml) must now also be mypy-ignore in our pyproject.toml. I don't mind this added complexity a single second: make your snippets runnable! :)

Copy link

github-actions bot commented Mar 11, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
75e311c https://rerun.io/viewer/pr/9260 +nightly +main

Note: This comment is updated whenever you push a commit.

Copy link

github-actions bot commented Mar 11, 2025

Latest documentation preview deployed successfully.

Result Commit Link
75e311c https://landing-33kzctsni-rerun.vercel.app/docs

Note: This comment is updated whenever you push a commit.

@abey79 abey79 merged commit d5482b5 into main Mar 13, 2025
41 of 42 checks passed
@abey79 abey79 deleted the antoine/snippet-mypy branch March 13, 2025 08:20
abey79 added a commit that referenced this pull request Mar 13, 2025
Adding that `__init__.py` in #9260 made mypy happy but snippets sad.
It's now explicitly ignored.
Wumpf pushed a commit that referenced this pull request Mar 14, 2025
This assert was introduced in #9260 and is apparently failing in CI. I'm
really not sure why, but anyways it's replaced by a `cast` now.
@emilk emilk mentioned this pull request Apr 11, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants