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 May 29, 2023
1 parent 810f957 commit f611158
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 f611158

Please sign in to comment.