Skip to content

Commit ffa6063

Browse files
author
FirstUnicorn
committed
fix: update inline Python script to use tomli instead of toml
The validation step in GitHub Actions was still using 'import toml' but we switched to tomli. This caused the 'Validate dependency consistency' step to fail with ModuleNotFoundError.
1 parent 266d2d1 commit ffa6063

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/validate-dependencies.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Validate dependency consistency (name/path matching + orphaned refs)
4444
run: |
4545
python << 'EOF'
46-
import toml
46+
import tomli
4747
import os
4848
import re
4949
@@ -54,7 +54,7 @@ jobs:
5454
print("=" * 60)
5555
5656
# 1. Check name/path consistency
57-
root = toml.load('pyproject.toml')
57+
root = tomli.load(open('pyproject.toml', 'rb'))
5858
deps = root.get('tool', {}).get('poetry', {}).get('dependencies', {})
5959
6060
for pkg_name, config in deps.items():
@@ -68,7 +68,7 @@ jobs:
6868
6969
pkg_toml = os.path.join(path, 'pyproject.toml')
7070
if os.path.exists(pkg_toml):
71-
pkg_config = toml.load(pkg_toml)
71+
pkg_config = tomli.load(open(pkg_toml, 'rb'))
7272
# Try PEP 621 format first, fall back to Poetry
7373
actual_name = pkg_config.get('project', {}).get('name')
7474
if not actual_name:

0 commit comments

Comments
 (0)