astral-sh/uv

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

Open

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

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

描述

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

贡献者指南

Show a better error when a uv lockfile is used in `-r` · astral-sh/uv#16192 | Good First Issue