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

الانتقال إلى التثبيت

معلومات المصدر

المستودع
cajias/claude-skills
آخر نشاط في المصدر
٢٠ يوليو ٢٠٢٦ في ٠٧:٢٩
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
٠
التفرعات
٠

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.