Skip to content

Conversation

@Andrej730
Copy link
Contributor

See example:

from typing import assert_type
import bpy

obj = bpy.context.active_object
assert obj

# <class 'bpy_prop_array'>
print(type(obj.color))
# (1.0, 1.0, 1.0, 1.0)
print(obj.color[:])

# "assert_type" mismatch: expected "tuple[float, ...]" but received "list[float]"
assert_type(obj.color[:], tuple[float, ...])

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