Skip to content

fix(ty): Fix ty-reported static type issues#88

Merged
janickm merged 1 commit intoNVIDIA:mainfrom
janickm:dev/janickm/push-nkzkxmvonnoy
May 5, 2026
Merged

fix(ty): Fix ty-reported static type issues#88
janickm merged 1 commit intoNVIDIA:mainfrom
janickm:dev/janickm/push-nkzkxmvonnoy

Conversation

@janickm
Copy link
Copy Markdown
Collaborator

@janickm janickm commented May 5, 2026

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:

  • Added explicit cast calls to Dict[str, JsonLike] for all generic metadata arguments in components_test.py to clarify types and prevent type-checking errors. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated the assertion in test_generic_data_and_metadata to cast the loaded quality value to float before comparison, ensuring type correctness.

Type annotation and import cleanups:

  • Added cast to the test imports to support new explicit casts.
  • Updated usages of timestamps_us in _get_frame_group to use cast(np.ndarray, ...) for better type clarity. [1] [2]
  • Removed unnecessary cast to zarr.Group in get_frame_ray_bundle_return_data_names, simplifying the code.

Minor code cleanup:

  • Removed unnecessary # type: ignore comment in types.py for a polynomial coefficient cast, as the type is now clear.

@janickm janickm self-assigned this May 5, 2026
@janickm janickm merged commit b0f54f0 into NVIDIA:main May 5, 2026
5 checks passed
@janickm janickm deleted the dev/janickm/push-nkzkxmvonnoy branch May 5, 2026 08:55
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.

1 participant