Clean up dead code, fix type errors, and add publish workflow

Remove unused _append_ops_call_method, fix _property_data_from_member
call signature, replace sys.version_info guard with hasattr check for
__buffer__ protocol, fix implicit string concatenations, add msgbus
overrides for 4.0-4.4, add conformance tests, and add publish script.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 11:07:52 +02:00
co-authored by Claude Opus 4.6
parent 673b9e54bc
commit f4df542dd1
17 changed files with 954 additions and 165 deletions
+17 -24
View File
@@ -7,15 +7,15 @@ requires-python = ">=3.11"
license = "MIT"
keywords = ["blender", "stubs", "typing", "bpy", "autocomplete"]
authors = [
{ name = "Joseph HENRY" },
{ name = "Autour de Minuit", email = "tech@autourdeminuit.com" },
{ 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",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Multimedia :: Graphics :: 3D Modeling",
]
dependencies = []
@@ -28,8 +28,10 @@ Issues = "https://git.autourdeminuit.com/autour_de_minuit/blender-python-stubs/i
target-version = ["py311"]
[tool.basedpyright]
typeCheckingMode = "strict"
typeCheckingMode = "all"
extraPaths = ["stubs"]
reportUnusedCallResult = false
reportAny = false
exclude = ["downloads/", ".venv/", "dist/", "conformance/"]
[tool.ruff]
@@ -48,18 +50,8 @@ 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)"
cmd = "python -m publish"
help = "Build and publish stubs with auto version bump (e.g., poe publish 5.0)"
[tool.poe.tasks.check]
help = "Run all checks (format, lint, typecheck, test)"
@@ -67,8 +59,9 @@ 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",
"basedpyright>=1.38.3",
"black>=26.3.1",
"poethepoet>=0.42.1",
"ruff>=0.15.6",
"typing-extensions>=4.15.0",
]