fix(ty): Fix ty-reported static type issues#88
Merged
janickm merged 1 commit intoNVIDIA:mainfrom May 5, 2026
Merged
Conversation
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.
This pull request focuses on improving type safety and code clarity by adding explicit type casting, especially for generic metadata and data structures. It also includes minor type annotation cleanups and imports to ensure correctness and maintainability.
Type safety and explicit casting improvements:
castcalls toDict[str, JsonLike]for all generic metadata arguments incomponents_test.pyto clarify types and prevent type-checking errors. [1] [2] [3] [4] [5] [6] [7] [8] [9]test_generic_data_and_metadatato cast the loaded quality value tofloatbefore comparison, ensuring type correctness.Type annotation and import cleanups:
castto the test imports to support new explicit casts.timestamps_usin_get_frame_groupto usecast(np.ndarray, ...)for better type clarity. [1] [2]casttozarr.Groupinget_frame_ray_bundle_return_data_names, simplifying the code.Minor code cleanup:
# type: ignorecomment intypes.pyfor a polynomial coefficient cast, as the type is now clear.