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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user