Skip to content

Conversation

@briangreunke
Copy link
Contributor

@briangreunke briangreunke commented Nov 19, 2025

Summary

This refactoring explicitly casts the return types of methods within the Image class that return NumPy arrays.

Conventional Commit Breakdown

  • Type: refactor
  • Scope: image
  • Subject: Explicitly cast array returns

Key Changes

  • dreadnode/data_types/image.py:
    • Added t.cast to explicitly type the return of the array property as np.ndarray[t.Any, np.dtype[np.float32]].
    • Added t.cast to explicitly type the return of the private _to_array method as np.ndarray[t.Any, t.Any].

Generated Summary:

  • Improved type hints for return values in the Image class methods.
  • Changed return type casts to use np.ndarray with specific dtype for safety and clarity.
  • Maintained existing functionality while enhancing type-checking capabilities.
  • Ensures better compatibility with static type checkers.

This summary was generated with ❤️ by rigging

@briangreunke briangreunke merged commit 117d53b into main Nov 19, 2025
8 checks passed
@briangreunke briangreunke deleted the chore/typing-updates branch November 19, 2025 22:09
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.

2 participants