Skip to content

Commit

Permalink
fixup! Do not process entries from poetry.lock until their category i…
Browse files Browse the repository at this point in the history
…s known
  • Loading branch information
frenzymadness committed May 29, 2024
1 parent 2f216c2 commit 48b6470
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions micropipenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,14 +806,15 @@ def _poetry2pipfile_lock(
normalize_package_name(name) for name in pyproject_poetry_section.get("dependencies", ())
]

try:
normalized_pyproject_poetry_dev_dependencies = [
normalize_package_name(name) for name in pyproject_poetry_section["group"]["dev"]["dependencies"]
]
except KeyError:
normalized_pyproject_poetry_dev_dependencies = []

from collections import deque
normalized_pyproject_poetry_dev_dependencies = []

groups = pyproject_poetry_section.get("group", {})
for group, content in groups.items():
print(group)
if "dependencies" in content:
normalized_pyproject_poetry_dev_dependencies.extend(
[normalize_package_name(name) for name in content["dependencies"]]
)

# Double-ended queue for entries
entries_queue = deque(poetry_lock["package"])
Expand Down

0 comments on commit 48b6470

Please sign in to comment.