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

Aller à l'installation

Informations de source

Dépôt
cajias/claude-skills
Dernière activité de la source
20 juillet 2026 à 07:29
Langue détectée de SKILL.md
anglais
Étoiles
0
Forks
0

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.