fake-bpy-module
fake-bpy-module copied to clipboard
Fake Blender Python API module collection for the code completion.
Currently, `bpy_prop_collection.values()` returns `list` it should return `list[GenericType]`.
- The resolution of #132 cause a regression in my code The following code does not pass Pyright or MyPy. ```python import bpy bpy.context.active_object.parent_vertices = [1, 2, 3] ``` -...
In .pyi files, the most recent syntax of python can be used, as it is only used for static analysis. Therefore, these changes can be made: - [ ] Remove...
The following code is valid ```python from mathutils import Color, Euler Color()[0] Euler()[0] ``` This is the following code. ```python class Color: def __getitem__(self, key: int) -> float: ... class...
`Matrix`, `Quaternion`, and `Vector` `@` operation is incompatible with `Sequence[float]`. Only `__matmul__` is needed `__rmatmul__` and `__imatmul__` can be removed. The following code is all the valid `@` operations. ```python...
`bpy.types.Context.active_object` type should be `Optional[Object]` instead of `Object` only. In general, I think that all active property could be optional. `bpy.types.Object.active_material` should also be optional.
The documentation and help text for `gen.py` still mentioned the removed `-d` option, while not mentioning the `-l` option.
As per #161: > In .pyi files, the most recent syntax of python can be used, as it is only used for static analysis. [`collections.abc.Buffer`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Buffer) was added in Python 3.12...
`properties_material/__init__.pyi`'s MaterialButtonsPanel.poll is missing `@classmethod` and using `self` as a first argument instead of `cls`.  So inheriting from it leads to issues: ```python from bl_ui.properties_material import MaterialButtonsPanel import bpy...
Which leads to the issues in the `draw()` method: ```python import bpy from typing import assert_type class ADDON_preferences(bpy.types.AddonPreferences): def draw(self, context): # "assert_type" mismatch: expected "UILayout" but received "UILayout |...