From 174414c5da0c18eb4160eae3f0ab377a4687e5f2 Mon Sep 17 00:00:00 2001 From: pppp56 <50910271+moreaupascal56@users.noreply.github.com> Date: Wed, 3 Jul 2024 06:54:19 +0200 Subject: [PATCH] Add entrypoints to tool list (#4661) Closes #4654 ## Summary The purpose of this is to show the entrypoints of each tool when running `uv tool list` as below: ``` $ uv tool list black black blackd ``` I used the proposed formatting as it was written in #4653 by @blueraft. I had to use spaces instead of tabs in order to make the test successful. Indeed in the test we are using a raw string and I did not manage to make the test pass when escaping the tab in the list.rs file so I used spaces everywhere. I had a deeper look into #4653 as well but it is more difficult as we need to get the version of the tool in the Tool object, I will continue on this next one later. Please tell me if anything else is needed I tried to follow the contribution guidelines but I might have forgotten something. Have a great day! ## Test Plan `cargo clippy` then by using the local version of uv as described in the Readme.md. ``` my-computer :~/mypath/uv$ cargo run -- tool list Compiling uv-cli v0.0.1 (/mypath/uv/crates/uv-cli) Compiling uv v0.2.18 (/mypath/uv/crates/uv) Finished `dev` profile [unoptimized + debuginfo] target(s) in 18.69s Running `target/debug/uv tool list` warning: `uv tool list` is experimental and may change without warning. black black blackd isort isort isort-identify-imports ``` and `cargo test tool_list` --------- Co-authored-by: Zanie Blue --- crates/uv/src/commands/tool/list.rs | 9 +++++++-- crates/uv/tests/tool_list.rs | 10 ++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/crates/uv/src/commands/tool/list.rs b/crates/uv/src/commands/tool/list.rs index 2a7997535ac..523bd298ea1 100644 --- a/crates/uv/src/commands/tool/list.rs +++ b/crates/uv/src/commands/tool/list.rs @@ -25,9 +25,14 @@ pub(crate) async fn list(preview: PreviewMode, printer: Printer) -> Result