Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the seperator_munge_get to provide flexibility for dependency lookup #398

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion conda_lock/lockfile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,19 @@ def seperator_munge_get(
try:
return d[key.replace("-", "_")]
except KeyError:
return d[key.replace("_", "-")]
try:
return d[key.replace("_", "-")]
except KeyError:
# for bullet-python or python-tzdata
try:
attempted_split = key.split("_")[0].split("-")[0]
if attempted_split == 'python':
attempted_split = key.split("_")[-1].split('-')[-1]
return d[attempted_split]
except KeyError:
list(d.keys())
raise KeyError(f"Could not find {key} in list of dependencies: {list(d.keys())}")


for name, request in requested.items():
todo: List[str] = list()
Expand Down