Use consistent parse terminology in pyproject error (#891)

We use `parse` for the other file types.
This commit is contained in:
Charlie Marsh 2024-01-11 21:25:47 -05:00 committed by GitHub
parent 65c600b666
commit 60cea0f07d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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"]