Add rna_type/bl_rna, GeometrySet, bpy.ops typing, publish task, and README updates
- Add rna_type and bl_rna as readonly properties on bpy_struct (fixes fake-bpy-module#419) - Discover non-RNA C classes in bpy.types like GeometrySet (fixes fake-bpy-module#436) - Introspect bpy.ops operator wrapper with poll(), idname(), get_rna_type(), bl_options - Handle builtin name shadowing (e.g. bpy.ops.object) with builtins. qualification - Add poe publish task for building and publishing to PyPI - Update project URLs to Gitea, improve generated README, add disclaimer - Fix f-string lint warning and type annotation for introspect_class Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -155,7 +155,7 @@ README_TEMPLATE = """\
|
||||
|
||||
Type stubs for Blender {blender_version} Python API.
|
||||
|
||||
Provides type information for `bpy`, `mathutils`, `bmesh`, `gpu`, `freestyle`, and other Blender Python modules.
|
||||
Provides autocomplete, type checking, and inline documentation for `bpy`, `mathutils`, `bmesh`, `gpu`, `freestyle`, and all other Blender Python modules.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -163,16 +163,31 @@ Provides type information for `bpy`, `mathutils`, `bmesh`, `gpu`, `freestyle`, a
|
||||
pip install "blender-python-stubs>={major_minor},<{next_minor}"
|
||||
```
|
||||
|
||||
## Usage
|
||||
## Features
|
||||
|
||||
Install alongside your Blender addon project for type checking with mypy, pyright, ty or your IDE.
|
||||
- Full Blender API coverage (`bpy`, `mathutils`, `bmesh`, `gpu`, `gpu_extras`, `bpy_extras`, `freestyle`, `aud`, `blf`, `bl_math`, `imbuf`, `idprop`)
|
||||
- Accurate collection types (`BlendDataObjects` instead of generic `bpy_prop_collection`)
|
||||
- Readonly `@property` decorators for RNA attributes
|
||||
- Typed context members (`bpy.context.active_object`, `selected_objects`, etc.)
|
||||
- Constructor signatures for `mathutils`, `gpu`, and other C extension types
|
||||
- Literal enum types instead of plain `str`
|
||||
- Zero `typing.Any` usage
|
||||
- 0 errors in basedpyright strict mode
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
import bpy
|
||||
|
||||
# Your IDE now provides autocomplete and type checking
|
||||
obj: bpy.types.Object = bpy.context.active_object
|
||||
obj.location.x = 1.0
|
||||
|
||||
bpy.data.objects.new("Cube", bpy.data.meshes.new("Mesh"))
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Generated by [blender-python-stubs](https://git.autourdeminuit.com/autour_de_minuit/blender-python-stubs).
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user