mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Use consistent parse terminology in pyproject error (#891)
We use `parse` for the other file types.
This commit is contained in:
parent
65c600b666
commit
60cea0f07d
2 changed files with 4 additions and 4 deletions
|
@ -117,7 +117,7 @@ impl RequirementsSpecification {
|
|||
RequirementsSource::PyprojectToml(path) => {
|
||||
let contents = fs::read_to_string(path)?;
|
||||
let pyproject_toml = toml::from_str::<pyproject_toml::PyProjectToml>(&contents)
|
||||
.with_context(|| format!("Failed to read `{}`", path.display()))?;
|
||||
.with_context(|| format!("Failed to parse `{}`", path.display()))?;
|
||||
let mut used_extras = FxHashSet::default();
|
||||
let mut requirements = Vec::new();
|
||||
let mut project_name = None;
|
||||
|
|
|
@ -142,7 +142,7 @@ fn invalid_pyproject_toml_syntax() -> Result<()> {
|
|||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
error: Failed to read `pyproject.toml`
|
||||
error: Failed to parse `pyproject.toml`
|
||||
Caused by: TOML parse error at line 1, column 5
|
||||
|
|
||||
1 | 123 - 456
|
||||
|
@ -171,7 +171,7 @@ fn invalid_pyproject_toml_schema() -> Result<()> {
|
|||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
error: Failed to read `pyproject.toml`
|
||||
error: Failed to parse `pyproject.toml`
|
||||
Caused by: TOML parse error at line 1, column 1
|
||||
|
|
||||
1 | [project]
|
||||
|
@ -205,7 +205,7 @@ dependencies = ["flask==1.0.x"]
|
|||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
error: Failed to read `pyproject.toml`
|
||||
error: Failed to parse `pyproject.toml`
|
||||
Caused by: TOML parse error at line 3, column 16
|
||||
|
|
||||
3 | dependencies = ["flask==1.0.x"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue