Skip to content

Commit

Permalink
Revert variable change
Browse files Browse the repository at this point in the history
  • Loading branch information
blueraft committed Aug 12, 2024
1 parent 32646b7 commit b6bb83d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/uv/src/commands/project/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,18 @@ enum Target {
///
/// This is useful when a dependency of the user-specified type was not found, but it may be present
/// elsewhere.
fn warn_if_present(requirement: &PackageName, pyproject: &PyProjectTomlMut) {
for dep_ty in pyproject.find_dependency(requirement, None) {
fn warn_if_present(name: &PackageName, pyproject: &PyProjectTomlMut) {
for dep_ty in pyproject.find_dependency(name, None) {
match dep_ty {
DependencyType::Production => {
warn_user!("`{requirement}` is a production dependency");
warn_user!("`{name}` is a production dependency");
}
DependencyType::Dev => {
warn_user!(
"`{requirement}` is a development dependency; try calling `uv remove --dev`",
);
warn_user!("`{name}` is a development dependency; try calling `uv remove --dev`",);
}
DependencyType::Optional(group) => {
warn_user!(
"`{requirement}` is an optional dependency; try calling `uv remove --optional {group}`",
"`{name}` is an optional dependency; try calling `uv remove --optional {group}`",
);
}
}
Expand Down

0 comments on commit b6bb83d

Please sign in to comment.