Skip to content

Commit

Permalink
perf: remove unnecessary deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
ralbertazzi committed Jun 5, 2023
1 parent 061e4fe commit b8e603e
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 b8e603e

Please sign in to comment.