Skip to content

Commit

Permalink
fix: handle when dev-dependencies are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Aug 14, 2024
1 parent 3a49e45 commit 02ee759
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion calcipy/experiments/sync_package_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def _collect_pyproject_versions(pyproject_text: str) -> dict[str, str]:

pyproject_versions: dict[str, str] = {}
# for section in
groups = [group['dependencies'] for group in pyproject['tool']['poetry']['group'].values()]
pyproject_groups = pyproject['tool']['poetry'].get('group', {})
groups = [group.group('dependencies', []) for group in pyproject_groups.values()]
for deps in [pyproject['tool']['poetry']['dependencies'], *groups]:
for name, value in deps.items():
if name == 'python':
Expand Down

0 comments on commit 02ee759

Please sign in to comment.