diff --git a/src/core/tracking.rs b/src/core/tracking.rs index 83b1922a4a..14ecaf166e 100644 --- a/src/core/tracking.rs +++ b/src/core/tracking.rs @@ -1586,7 +1586,7 @@ fn categorize_command(rtk_cmd: &str) -> String { "cargo" => "cargo", "npm" | "npx" | "pnpm" | "bun" | "bunx" | "deno" | "vitest" | "tsc" | "lint" | "prettier" | "next" | "playwright" | "prisma" => "js", - "pytest" | "ruff" | "mypy" | "pip" | "sqlfluff" => "python", + "pytest" | "ruff" | "mypy" | "pip" | "sqlfluff" | "uv" => "python", "go" | "golangci-lint" => "go", "docker" | "kubectl" => "cloud", "rspec" | "rubocop" | "rake" => "ruby", @@ -2786,6 +2786,13 @@ mod tests { } } + #[test] + fn test_categorize_uv_as_python() { + for cmd in ["rtk uv sync", "rtk uv run pytest", "rtk uv pip install foo"] { + assert_eq!(categorize_command(cmd), "python", "{cmd}"); + } + } + // 14. get_by_command uses weighted savings rate, not unweighted average // // Regression test for: AVG(savings_pct) gave wrong results when small invocations