File tree Expand file tree Collapse file tree 5 files changed +4
-34
lines changed
Expand file tree Collapse file tree 5 files changed +4
-34
lines changed Original file line number Diff line number Diff line change 11use std:: ops:: Deref ;
22use std:: path:: { Path , PathBuf } ;
33
4- use tracing:: debug;
4+ use tracing:: { debug, warn } ;
55
66use uv_fs:: Simplified ;
7- use uv_warnings:: warn_user ;
7+ use uv_warnings:: owo_colors :: OwoColorize ;
88
99pub use crate :: combine:: * ;
1010pub use crate :: settings:: * ;
@@ -74,7 +74,7 @@ impl FilesystemOptions {
7474 }
7575 Err ( Error :: PyprojectToml ( file, err) ) => {
7676 // If we see an invalid `pyproject.toml`, warn but continue.
77- warn_user ! (
77+ warn ! (
7878 "Failed to parse `{}` during settings discovery:\n {}" ,
7979 file. cyan( ) ,
8080 textwrap:: indent( & err. to_string( ) , " " )
@@ -107,7 +107,7 @@ impl FilesystemOptions {
107107 . and_then ( |content| toml:: from_str :: < PyProjectToml > ( & content) . ok ( ) )
108108 {
109109 if pyproject. tool . is_some_and ( |tool| tool. uv . is_some ( ) ) {
110- warn_user ! (
110+ warn ! (
111111 "Found both a `uv.toml` file and a `[tool.uv]` section in an adjacent `pyproject.toml`. The `[tool.uv]` section will be ignored in favor of the `uv.toml` file."
112112 ) ;
113113 }
Original file line number Diff line number Diff line change @@ -12653,13 +12653,6 @@ fn lock_duplicate_sources() -> Result<()> {
1265312653 ----- stdout -----
1265412654
1265512655 ----- stderr -----
12656- warning: Failed to parse `pyproject.toml` during settings discovery:
12657- TOML parse error at line 9, column 9
12658- |
12659- 9 | python-multipart = { url = "https://files.pythonhosted.org/packages/c0/3e/9fbfd74e7f5b54f653f7ca99d44ceb56e718846920162165061c4c22b71a/python_multipart-0.0.8-py3-none-any.whl" }
12660- | ^
12661- duplicate key `python-multipart` in table `tool.uv.sources`
12662-
1266312656 error: Failed to parse: `pyproject.toml`
1266412657 Caused by: TOML parse error at line 9, column 9
1266512658 |
Original file line number Diff line number Diff line change @@ -3285,15 +3285,6 @@ fn override_dependency_from_workspace_invalid_syntax() -> Result<()> {
32853285 ----- stdout -----
32863286
32873287 ----- stderr -----
3288- warning: Failed to parse `pyproject.toml` during settings discovery:
3289- TOML parse error at line 9, column 29
3290- |
3291- 9 | override-dependencies = [
3292- | ^
3293- no such comparison operator "=", must be one of ~= == != <= >= < > ===
3294- werkzeug=2.3.0
3295- ^^^^^^
3296-
32973288 error: Failed to parse: `pyproject.toml`
32983289 Caused by: TOML parse error at line 9, column 29
32993290 |
Original file line number Diff line number Diff line change @@ -92,13 +92,6 @@ fn invalid_pyproject_toml_syntax() -> Result<()> {
9292 ----- stdout -----
9393
9494 ----- stderr -----
95- warning: Failed to parse `pyproject.toml` during settings discovery:
96- TOML parse error at line 1, column 5
97- |
98- 1 | 123 - 456
99- | ^
100- expected `.`, `=`
101-
10295 error: Failed to parse: `pyproject.toml`
10396 Caused by: TOML parse error at line 1, column 5
10497 |
Original file line number Diff line number Diff line change @@ -494,13 +494,6 @@ fn create_venv_warns_user_on_requires_python_discovery_error() -> Result<()> {
494494 ----- stdout -----
495495
496496 ----- stderr -----
497- warning: Failed to parse `pyproject.toml` during settings discovery:
498- TOML parse error at line 1, column 9
499- |
500- 1 | invalid toml
501- | ^
502- expected `.`, `=`
503-
504497 warning: Failed to parse: `pyproject.toml`
505498 Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
506499 Creating virtualenv at: .venv
You can’t perform that action at this time.
0 commit comments