uv icon indicating copy to clipboard operation
uv copied to clipboard

Avoid showing duplicate paths in `uv python list`

Open leaf-soba opened this issue 1 year ago • 1 comments

Summary

  • Resolves issue #6690

Test Plan

$ cargo run python list

leaf-soba avatar Aug 28 '24 08:08 leaf-soba

Hi! Thanks for contributing this fix.

I applied a small patch (https://github.com/astral-sh/uv/pull/6740/commits/4d4cd93ada926005bfeec5eb39c50919b209b734) to move the filtering up where we do all the other filtering. What do you think?

zanieb avatar Aug 28 '24 13:08 zanieb

Tested with

❯ PATH="/Users/zb/Library/Application Support/uv/python/cpython-3.10.13-macos-aarch64-none/bin/:$PATH" uv python list | wc -l
      16
❯ PATH="/Users/zb/Library/Application Support/uv/python/cpython-3.10.13-macos-aarch64-none/bin/:$PATH" ./target/debug/uv python list | wc -l
      15

zanieb avatar Aug 28 '24 15:08 zanieb

Hi! Thanks for contributing this fix.

I applied a small patch (4d4cd93) to move the filtering up where we do all the other filtering. What do you think?

thanks it looks great! sorry I'm new to Rust and I didn't run all test, so my code failed in two cases.

leaf-soba avatar Aug 29 '24 01:08 leaf-soba