nutti / fake-bpy-module

Fake Blender Python API module collection for the code completion.
MIT License
1.37k stars 97 forks source link

Vector swizzles are returning typing.Any instead of Vector #272

Closed Andrej730 closed 2 months ago

Andrej730 commented 3 months ago

See example below.

from mathutils import Vector
from typing import assert_type

a = Vector()
b = a.xyz
# "assert_type" mismatch: expected "Vector" but received "Any"
assert_type(b, Vector)

image

Road-hog123 commented 2 months ago

I have submitted a PR to fix this upstream, but it probably won't get into 4.2 LTS. :( #124275 - PyDoc Fix: mathutils Vector swizzle attributes untyped

nutti commented 2 months ago

@Road-hog123 Thank you. If the PR is merged into the blender repository, please let me know.

Road-hog123 commented 2 months ago

@nutti PR has been merged! 🎉

nutti commented 2 months ago

@Road-hog123 Good news! Thank you for the notification.

nutti commented 2 months ago

I will close this issue.