blender-python-stubs/pyproject.toml
Joseph HENRY 6ea41f3b4d 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>
2026-03-26 15:07:35 +01:00

74 lines
2.4 KiB
TOML

[project]
name = "blender-python-stubs"
version = "0.1.0"
description = "Type stubs generator for Blender's Python API"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
keywords = ["blender", "stubs", "typing", "bpy", "autocomplete"]
authors = [
{ name = "Joseph HENRY" },
{ name = "Autour de Minuit", email = "tech@autourdeminuit.com" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Multimedia :: Graphics :: 3D Modeling",
]
dependencies = []
[project.urls]
Homepage = "https://git.autourdeminuit.com/autour_de_minuit/blender-python-stubs"
Repository = "https://git.autourdeminuit.com/autour_de_minuit/blender-python-stubs"
Issues = "https://git.autourdeminuit.com/autour_de_minuit/blender-python-stubs/issues"
[tool.black]
target-version = ["py311"]
[tool.basedpyright]
typeCheckingMode = "strict"
extraPaths = ["stubs"]
exclude = ["downloads/", ".venv/", "dist/"]
[tool.ruff]
exclude = ["dist/"]
[tool.poe.tasks]
format = { cmd = "black .", help = "Format all Python files" }
lint = { cmd = "ruff check .", help = "Lint all Python files" }
typecheck = { cmd = "basedpyright", help = "Run type checker on source code" }
typecheck-stubs = { cmd = "python -m main --typecheck-stubs", help = "Type-check generated stubs (e.g., poe typecheck-stubs 4.0 4.1)" }
test = { cmd = "python -m unittest discover -s tests -v", help = "Run unit tests" }
[tool.poe.tasks.generate]
cmd = "python -m main"
help = "Generate stubs for Blender versions (e.g., poe generate 5.0 4.3)"
[tool.poe.tasks.publish]
shell = "uv build dist/$version && uv publish dist/$version/dist/* --publish-url ${publish_url}"
help = "Build and publish stubs (e.g., poe publish 5.0)"
[tool.poe.tasks.publish.args.version]
positional = true
required = true
help = "Blender version to publish (e.g., 5.0)"
[tool.poe.tasks.publish.args.publish-url]
options = ["--publish-url"]
default = "https://test.pypi.org/legacy/"
help = "PyPI upload URL (defaults to Test PyPI)"
[tool.poe.tasks.check]
help = "Run all checks (format, lint, typecheck, test)"
sequence = ["format", "lint", "typecheck", "test", "typecheck-stubs"]
[dependency-groups]
dev = [
"basedpyright>=1.38.3",
"black>=26.3.1",
"poethepoet>=0.42.1",
"ruff>=0.15.6",
]