Coverage for packages/workshop/src/livery/workshop/_uv.py: 100%
Measured by coverage.py 7.16.2 on CPython 3.14 while the suites of tests, packages/workshop, packages/extensions/ty, packages/extensions/ruff, packages/extensions/python, packages/extensions/pytest, packages/extensions/pyrefly, packages/extensions/nanobind, packages/extensions/mypy, packages/extensions/mkdocstrings, packages/extensions/lfs, packages/extensions/docs, packages/extensions/cpp, packages/extensions/coverage, packages/extensions/conan, packages/extensions/cmake, packages/extensions/claude, packages/extensions/clang-tidy, packages/extensions/clang-format, packages/extensions/changelog, packages/extensions/basedpyright ran.
Keys
- r m x p show or hide the lines of a kind
- j k the next or previous highlighted chunk
- 0 the top of the page
- 1 the first highlighted chunk
- [ ] the previous or next file
- u the index
- ? show or hide this help
1"""The one way the workshop runs uv.
3Every uv invocation goes through livery.workshop._uv.run_uv, so
4capture, the working directory, and the failure shape cannot drift
5between call sites: a failure is uv's own words, raised through
9from __future__ import annotations
11from pathlib import Path
13import livery.toolroom.tools as tools
14from livery.footman import fail
17def run_uv(*args: str, root: Path) -> None:
18 """Run ``uv *args`` at *root*; a failure carries uv's own words."""
19 result = tools.uv.opts(cwd=root, nofail=True, recorded=False)(*args)
20 if result.code != 0:
22 f"uv {' '.join(args)} exited {result.code}:\n{result.stdout}{result.stderr}"