astral-sh/uv

Show a better error when a uv lockfile is used in `-r`

Open

#16,192 创建于 2025年10月8日

在 GitHub 查看
 (3 评论) (4 反应) (0 负责人)Rust (3,111 fork)batch import
error messageshelp wanted

仓库指标

Star
 (84,934 star)
PR 合并指标
 (平均合并 7天 16小时) (30 天内合并 259 个 PR)

描述

e.g., if you try to use uv lock --script action.py then -r action.py.lock

error: Couldn't parse requirement in `action.py.lock` at position 0
  Caused by: no such comparison operator "=", must be one of ~= == != <= >= < > ===
version = 1
        ^^^

We can do better by detecting our own lockfile format

贡献者指南