nutti / fake-bpy-module

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

`bpy_prop_collection` missing `__iter__` #114

Closed MicaelJarniac closed 2 years ago

MicaelJarniac commented 2 years ago

Related to #97.

for window in bpy.context.window_manager.windows:
    # "bpy_prop_collection[Window]" has no attribute "__iter__" (not iterable) | mypy(error)
    pass

On the real bpy, it does seem to have __iter__ (see issue #97).

I'm actually not too sure what's the issue here since, for some fors, Mypy isn't complaining.

nutti commented 2 years ago

@MicaelJarniac

At that moment, I added __iter__ method to bpy_prop_collection when I fixed the issue #97 . However, adding __iter__ method does not work for my environment (VSCode). Does it work on your environment?

nutti commented 2 years ago

It seems that my environment was bad. Fixed version works correctly in my environment.