diff --git a/crates/uv-workspace/src/workspace.rs b/crates/uv-workspace/src/workspace.rs index 2d6998f9a..08158909d 100644 --- a/crates/uv-workspace/src/workspace.rs +++ b/crates/uv-workspace/src/workspace.rs @@ -60,7 +60,7 @@ impl Workspace { Ok(None) } - /// Load a [`Workspace`] from a `pyproject.toml` or `uv.toml` file. + /// Load a [`Workspace`] from a `uv.toml` file. pub fn from_file(path: impl AsRef) -> Result { Ok(Self { options: read_file(path.as_ref())?, @@ -139,18 +139,12 @@ fn find_in_directory(dir: &Path) -> Result, WorkspaceError> { Ok(None) } -/// Load [`Options`] from a `pyproject.toml` or `uv.toml` file. +/// Load [`Options`] from a `uv.toml` file. fn read_file(path: &Path) -> Result { let content = fs_err::read_to_string(path)?; - if path.ends_with("pyproject.toml") { - let pyproject: PyProjectToml = toml::from_str(&content) - .map_err(|err| WorkspaceError::PyprojectToml(path.user_display().to_string(), err))?; - Ok(pyproject.tool.and_then(|tool| tool.uv).unwrap_or_default()) - } else { - let options: Options = toml::from_str(&content) - .map_err(|err| WorkspaceError::UvToml(path.user_display().to_string(), err))?; - Ok(options) - } + let options: Options = toml::from_str(&content) + .map_err(|err| WorkspaceError::UvToml(path.user_display().to_string(), err))?; + Ok(options) } #[derive(thiserror::Error, Debug)] diff --git a/crates/uv/src/cli.rs b/crates/uv/src/cli.rs index 2304388f9..4e374fd55 100644 --- a/crates/uv/src/cli.rs +++ b/crates/uv/src/cli.rs @@ -32,7 +32,7 @@ pub(crate) struct Cli { #[command(flatten)] pub(crate) cache_args: CacheArgs, - /// The path to a `pyproject.toml` or `uv.toml` file to use for configuration. + /// The path to a `uv.toml` file to use for configuration. #[arg(long, env = "UV_CONFIG_FILE", hide = true)] pub(crate) config_file: Option,