Add conformance tests and fix introspection issues
- Add conformance test framework with poe conformance task - Add test files for mathutils, bpy, and gpu API patterns - Fix self param leaking into signatures from C method_descriptors - Synthesize __iter__ for classes with __getitem__ but no explicit __iter__ - Add __iter__ runtime probing to discover Iterator[element_type] - Add :raises to directive lookahead to fix rtype parsing - Add 5.1 override for Matrix.Translation to accept Vector Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -30,7 +30,7 @@ target-version = ["py311"]
|
||||
[tool.basedpyright]
|
||||
typeCheckingMode = "strict"
|
||||
extraPaths = ["stubs"]
|
||||
exclude = ["downloads/", ".venv/", "dist/"]
|
||||
exclude = ["downloads/", ".venv/", "dist/", "conformance/"]
|
||||
|
||||
[tool.ruff]
|
||||
exclude = ["dist/"]
|
||||
@@ -40,6 +40,7 @@ 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)" }
|
||||
conformance = { cmd = "python -m main --conformance", help = "Run conformance tests against generated stubs (e.g., poe conformance 5.0)" }
|
||||
test = { cmd = "python -m unittest discover -s tests -v", help = "Run unit tests" }
|
||||
|
||||
[tool.poe.tasks.generate]
|
||||
|
||||
Reference in New Issue
Block a user