astral-sh/uv

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

Open

Aperta il 8 ott 2025

Vedi su GitHub
 (3 commenti) (3 reazioni) (0 assegnatari)Rust (84.934 star) (3111 fork)batch import
error messageshelp wanted

Descrizione

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

Guida contributor