diff --git a/pyproject.toml b/pyproject.toml index 74b53112c4bb..5401bd03a533 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,7 +85,10 @@ version_files = [ [tool.mypy] ignore_missing_imports = true -files = "crates/uv-python/*.py" +files = [ + "crates/uv-python/*.py", + "python/uv/*.py", +] [tool.uv] managed = false diff --git a/python/uv/_build_backend.py b/python/uv/_build_backend.py index a1284fe40b73..5ab4cb1ba3f4 100644 --- a/python/uv/_build_backend.py +++ b/python/uv/_build_backend.py @@ -37,13 +37,13 @@ def call(args: "list[str]", config_settings: "dict | None" = None) -> str: if result.returncode != 0: sys.exit(result.returncode) # If there was extra stdout, forward it (there should not be extra stdout) - result = result.stdout.decode("utf-8").strip().splitlines(keepends=True) - sys.stdout.writelines(result[:-1]) + stdout = result.stdout.decode("utf-8").strip().splitlines(keepends=True) + sys.stdout.writelines(stdout[:-1]) # Fail explicitly instead of an irrelevant stacktrace - if not result: + if not stdout: print("uv subprocess did not return a filename on stdout", file=sys.stderr) sys.exit(1) - return result[-1].strip() + return stdout[-1].strip() def build_sdist(sdist_directory: str, config_settings: "dict | None" = None):