guard the last tomllib import in test_install_references for Python 3.10

Same 3.11+-stdlib issue as gen.py: this test imported tomllib directly, failing
the 3.10 job. Fall back to tomli on <3.11.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Safi
2026-06-02 21:36:53 +01:00
co-authored by Claude Opus 4.8
parent 097b50a5d1
commit 4806c1ee7e
+4 -1
View File
@@ -285,7 +285,10 @@ def test_pyproject_declares_references_globs():
exists; the skill bodies are graphify/skill*.md, listed explicitly), so it was
removed. This test guards the real shipped layout.
"""
import tomllib
try:
import tomllib # Python 3.11+ stdlib
except ModuleNotFoundError: # Python 3.10
import tomli as tomllib # type: ignore[no-redef]
pyproject = PKG_DIR.parent / "pyproject.toml"
if not pyproject.exists():