From b46c6db317b0b534b8ae8d636d041b7779921fa8 Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Thu, 16 Jan 2025 15:53:59 +0100 Subject: [PATCH] docs: fix a few typos (#10675) ## Summary Fixing a few typos found in the documentation and in comments. --- crates/uv-cli/src/lib.rs | 4 ++-- crates/uv-pep508/src/marker/algebra.rs | 2 +- crates/uv-python/src/discovery.rs | 2 +- crates/uv-resolver/src/pubgrub/report.rs | 2 +- crates/uv-workspace/src/pyproject.rs | 10 +++++----- crates/uv/src/commands/python/pin.rs | 4 ++-- docs/reference/cli.md | 2 +- docs/reference/settings.md | 10 +++++----- uv.schema.json | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 2b9ff90f5d14..053e1eb78a06 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -2395,8 +2395,8 @@ pub struct VenvArgs { /// the directory name. If not provided (`uv venv`), the prompt is set to /// the current directory's name. /// - /// If "." is provided, the the current directory name will be used - /// regardless of whether a path was provided to `uv venv`. + /// If "." is provided, the current directory name will be used regardless + /// of whether a path was provided to `uv venv`. #[arg(long, verbatim_doc_comment)] pub prompt: Option, diff --git a/crates/uv-pep508/src/marker/algebra.rs b/crates/uv-pep508/src/marker/algebra.rs index 303d2696f494..959827924aa7 100644 --- a/crates/uv-pep508/src/marker/algebra.rs +++ b/crates/uv-pep508/src/marker/algebra.rs @@ -1556,7 +1556,7 @@ fn python_version_to_full_version(specifier: VersionSpecifier) -> Result( }) .flatten(); - // Check if the the base conda environment is active + // Check if the base conda environment is active let from_base_conda_environment = iter::once_with(|| { conda_environment_from_env(CondaEnvironmentKind::Base) .into_iter() diff --git a/crates/uv-resolver/src/pubgrub/report.rs b/crates/uv-resolver/src/pubgrub/report.rs index e3c202158052..534b190a8829 100644 --- a/crates/uv-resolver/src/pubgrub/report.rs +++ b/crates/uv-resolver/src/pubgrub/report.rs @@ -1847,7 +1847,7 @@ fn update_availability_range( let segment_range = Range::from_range_bounds((lower.clone(), upper.clone())); // Drop the segment if it's disjoint with the available range, e.g., if the segment is - // `foo>999`, and the the available versions are all `<10` it's useless to show. + // `foo>999`, and the available versions are all `<10` it's useless to show. if segment_range.is_disjoint(&available_range) { continue; } diff --git a/crates/uv-workspace/src/pyproject.rs b/crates/uv-workspace/src/pyproject.rs index d2d19cd9b5f4..97afd4afdf5c 100644 --- a/crates/uv-workspace/src/pyproject.rs +++ b/crates/uv-workspace/src/pyproject.rs @@ -316,7 +316,7 @@ pub struct ToolUv { /// [`extra_index_url`](#extra-index-url). uv will only consider the first index that contains /// a given package, unless an alternative [index strategy](#index-strategy) is specified. /// - /// If an index is marked as `explicit = true`, it will be used exclusively for those + /// If an index is marked as `explicit = true`, it will be used exclusively for the /// dependencies that select it explicitly via `[tool.uv.sources]`, as in: /// /// ```toml @@ -394,8 +394,8 @@ pub struct ToolUv { /// /// Use of this field is not recommend anymore. Instead, use the `dependency-groups.dev` field /// which is a standardized way to declare development dependencies. The contents of - /// `tool.uv.dev-dependencies` and `dependency-groups.dev` are combined to determine the the - /// final requirements of the `dev` dependency group. + /// `tool.uv.dev-dependencies` and `dependency-groups.dev` are combined to determine the final + /// requirements of the `dev` dependency group. #[cfg_attr( feature = "schemars", schemars( @@ -473,7 +473,7 @@ pub struct ToolUv { value_type = "list[str]", example = r#" # Ensure that the grpcio version is always less than 1.65, if it's requested by a - # transitive dependency. + # direct or transitive dependency. constraint-dependencies = ["grpcio<1.65"] "# )] @@ -485,7 +485,7 @@ pub struct ToolUv { /// However, you can restrict the set of supported environments to improve performance and avoid /// unsatisfiable branches in the solution space. /// - /// These environments will also respected when `uv pip compile` is invoked with the + /// These environments will also be respected when `uv pip compile` is invoked with the /// `--universal` flag. #[cfg_attr( feature = "schemars", diff --git a/crates/uv/src/commands/python/pin.rs b/crates/uv/src/commands/python/pin.rs index 4f0f3d135aa9..a16439e6b0dc 100644 --- a/crates/uv/src/commands/python/pin.rs +++ b/crates/uv/src/commands/python/pin.rs @@ -203,8 +203,8 @@ fn warn_if_existing_pin_incompatible_with_project( } } - // If the there is not a version in the pinned request, attempt to resolve the pin into an interpreter - // to check for compatibility on the current system. + // If there is not a version in the pinned request, attempt to resolve the pin into an + // interpreter to check for compatibility on the current system. match PythonInstallation::find( pin, EnvironmentPreference::OnlySystem, diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 69367800eeb4..c06aba3f148d 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -8035,7 +8035,7 @@ uv venv [OPTIONS] [PATH]

By default, the prompt is dependent on whether a path was provided to uv venv. If provided (e.g, uv venv project), the prompt is set to the directory name. If not provided (uv venv), the prompt is set to the current directory’s name.

-

If "." is provided, the the current directory name will be used regardless of whether a path was provided to uv venv.

+

If "." is provided, the current directory name will be used regardless of whether a path was provided to uv venv.

--python, -p python

The Python interpreter to use for the virtual environment.

diff --git a/docs/reference/settings.md b/docs/reference/settings.md index f401eef33adc..0368c66950d4 100644 --- a/docs/reference/settings.md +++ b/docs/reference/settings.md @@ -75,7 +75,7 @@ transitive dependencies. ```toml title="pyproject.toml" [tool.uv] # Ensure that the grpcio version is always less than 1.65, if it's requested by a -# transitive dependency. +# direct or transitive dependency. constraint-dependencies = ["grpcio<1.65"] ``` @@ -107,8 +107,8 @@ not appear in the project's published metadata. Use of this field is not recommend anymore. Instead, use the `dependency-groups.dev` field which is a standardized way to declare development dependencies. The contents of -`tool.uv.dev-dependencies` and `dependency-groups.dev` are combined to determine the the -final requirements of the `dev` dependency group. +`tool.uv.dev-dependencies` and `dependency-groups.dev` are combined to determine the final +requirements of the `dev` dependency group. **Default value**: `[]` @@ -131,7 +131,7 @@ By default, uv will resolve for all possible environments during a `uv lock` ope However, you can restrict the set of supported environments to improve performance and avoid unsatisfiable branches in the solution space. -These environments will also respected when `uv pip compile` is invoked with the +These environments will also be respected when `uv pip compile` is invoked with the `--universal` flag. **Default value**: `[]` @@ -161,7 +161,7 @@ higher priority than any indexes specified via [`index_url`](#index-url) or [`extra_index_url`](#extra-index-url). uv will only consider the first index that contains a given package, unless an alternative [index strategy](#index-strategy) is specified. -If an index is marked as `explicit = true`, it will be used exclusively for those +If an index is marked as `explicit = true`, it will be used exclusively for the dependencies that select it explicitly via `[tool.uv.sources]`, as in: ```toml diff --git a/uv.schema.json b/uv.schema.json index 5304a2a6fe52..52f5e3661a27 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -191,7 +191,7 @@ ] }, "index": { - "description": "The indexes to use when resolving dependencies.\n\nAccepts either a repository compliant with [PEP 503](https://peps.python.org/pep-0503/) (the simple repository API), or a local directory laid out in the same format.\n\nIndexes are considered in the order in which they're defined, such that the first-defined index has the highest priority. Further, the indexes provided by this setting are given higher priority than any indexes specified via [`index_url`](#index-url) or [`extra_index_url`](#extra-index-url). uv will only consider the first index that contains a given package, unless an alternative [index strategy](#index-strategy) is specified.\n\nIf an index is marked as `explicit = true`, it will be used exclusively for those dependencies that select it explicitly via `[tool.uv.sources]`, as in:\n\n```toml [[tool.uv.index]] name = \"pytorch\" url = \"https://download.pytorch.org/whl/cu121\" explicit = true\n\n[tool.uv.sources] torch = { index = \"pytorch\" } ```\n\nIf an index is marked as `default = true`, it will be moved to the end of the prioritized list, such that it is given the lowest priority when resolving packages. Additionally, marking an index as default will disable the PyPI default index.", + "description": "The indexes to use when resolving dependencies.\n\nAccepts either a repository compliant with [PEP 503](https://peps.python.org/pep-0503/) (the simple repository API), or a local directory laid out in the same format.\n\nIndexes are considered in the order in which they're defined, such that the first-defined index has the highest priority. Further, the indexes provided by this setting are given higher priority than any indexes specified via [`index_url`](#index-url) or [`extra_index_url`](#extra-index-url). uv will only consider the first index that contains a given package, unless an alternative [index strategy](#index-strategy) is specified.\n\nIf an index is marked as `explicit = true`, it will be used exclusively for the dependencies that select it explicitly via `[tool.uv.sources]`, as in:\n\n```toml [[tool.uv.index]] name = \"pytorch\" url = \"https://download.pytorch.org/whl/cu121\" explicit = true\n\n[tool.uv.sources] torch = { index = \"pytorch\" } ```\n\nIf an index is marked as `default = true`, it will be moved to the end of the prioritized list, such that it is given the lowest priority when resolving packages. Additionally, marking an index as default will disable the PyPI default index.", "type": [ "array", "null"