Skip to content

Commit

Permalink
perf: remove unnecessary deepcopy (#8031)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralbertazzi authored Jun 10, 2023
1 parent a9ac06f commit 17454be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/repositories/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ def package(
canonicalized_name = canonicalize_name(name)
for package in self.packages:
if canonicalized_name == package.name and package.version == version:
return package.clone()
return package

raise PackageNotFound(f"Package {name} ({version}) not found.")

0 comments on commit 17454be

Please # to comment.