Skip to content

Commit

Permalink
Use path.name directly w/o assignment
Browse files Browse the repository at this point in the history
Apply suggestions from code review

Co-authored-by: Ben Mares <services-git-throwaway1@tensorial.com>
  • Loading branch information
riccardoporreca and maresb authored Jul 9, 2023
1 parent 3af671d commit b2791b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions conda_lock/conda_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,6 @@ def fake_conda_environment(
channel = urlunsplit(
(url.scheme, url.hostname, str(path.parent), None, None)
)
file_name = path.name
while path.suffix in {".tar", ".bz2", ".gz", ".conda"}:
path = path.with_suffix("")
build = path.name.split("-")[-1]
Expand All @@ -578,7 +577,7 @@ def fake_conda_environment(
"build_number": build_number,
"version": dep.version,
"subdir": path.parent.name,
"fn": file_name,
"fn": path.name,
"depends": [f"{k} {v}".strip() for k, v in dep.dependencies.items()],
}
# mamba requires these to be stringlike so null are not allowed here
Expand Down

0 comments on commit b2791b6

Please sign in to comment.