Skip to main content

uv-worktree-venv-fallthrough

Fix for phantom Python test failures in fresh git worktrees of uv-managed projects, caused by `uv run` falling through to a PATH-resolved command (e.g. homebrew Python 3.9's pytest) when the worktree's `.venv` doesn't have the command installed. Use when: (1) `uv run pytest --collect-only -q` in a freshly-created worktree reports `ModuleNotFoundError: No module named 'msgspec'` (or any other project runtime dep) on test files that import the package; (2) you see `ImportError: cannot import name 'UTC' from 'datetime'` or `dataclass() got an unexpected keyword argument 'slots'` despite `pyproject.toml` requiring Python 3.10+/3.12+; (3) the same `uv run pytest` succeeds on the main worktree but fails on a sibling worktree; (4) `which pytest` (or `which ruff`, `which mypy`) inside the worktree resolves to `/opt/homebrew/bin/...` instead of `<worktree>/.venv/bin/...`; (5) you're orchestrating parallel agents in worktree-isolation mode and they report wildly inconsistent test results vs the main tree. Root cause is

Ir para a instalação

Informações da origem

Repositório
cajias/claude-skills
Última atividade na origem
20 de julho de 2026 às 07:29
Idioma detectado do SKILL.md
inglês
Estrelas
0
Forks
0

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.