From 4ece8e5c1e674eb0d751fa55b5a72950aa9d20f0 Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Wed, 6 Nov 2024 08:49:32 +0530 Subject: [PATCH] Use "Ruff" instead of "uv" for `src` setting docs (#14121) ## Summary From https://github.com/astral-sh/ruff/commit/15aa5a6d576014c8687c995976d5b1966e87f4be --- crates/ruff_workspace/src/options.rs | 2 +- ruff.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ruff_workspace/src/options.rs b/crates/ruff_workspace/src/options.rs index 6e87221f4b..bc2ad6262e 100644 --- a/crates/ruff_workspace/src/options.rs +++ b/crates/ruff_workspace/src/options.rs @@ -339,7 +339,7 @@ pub struct Options { /// 1. The directory containing the nearest `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (the "project root"). /// 2. The `"src"` subdirectory of the project root. /// - /// These defaults ensure that uv supports both flat layouts and `src` layouts out-of-the-box. + /// These defaults ensure that Ruff supports both flat layouts and `src` layouts out-of-the-box. /// (If a configuration file is explicitly provided (e.g., via the `--config` command-line /// flag), the current working directory will be considered the project root.) /// diff --git a/ruff.schema.json b/ruff.schema.json index 53d4be452c..766ef6f3ba 100644 --- a/ruff.schema.json +++ b/ruff.schema.json @@ -682,7 +682,7 @@ ] }, "src": { - "description": "The directories to consider when resolving first- vs. third-party imports.\n\nWhen omitted, the `src` directory will typically default to including both:\n\n1. The directory containing the nearest `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (the \"project root\"). 2. The `\"src\"` subdirectory of the project root.\n\nThese defaults ensure that uv supports both flat layouts and `src` layouts out-of-the-box. (If a configuration file is explicitly provided (e.g., via the `--config` command-line flag), the current working directory will be considered the project root.)\n\nAs an example, consider an alternative project structure, like:\n\n```text my_project ├── pyproject.toml └── lib └── my_package ├── __init__.py ├── foo.py └── bar.py ```\n\nIn this case, the `./lib` directory should be included in the `src` option (e.g., `src = [\"lib\"]`), such that when resolving imports, `my_package.foo` is considered first-party.\n\nThis field supports globs. For example, if you have a series of Python packages in a `python_modules` directory, `src = [\"python_modules/*\"]` would expand to incorporate all packages in that directory. User home directory and environment variables will also be expanded.", + "description": "The directories to consider when resolving first- vs. third-party imports.\n\nWhen omitted, the `src` directory will typically default to including both:\n\n1. The directory containing the nearest `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (the \"project root\"). 2. The `\"src\"` subdirectory of the project root.\n\nThese defaults ensure that Ruff supports both flat layouts and `src` layouts out-of-the-box. (If a configuration file is explicitly provided (e.g., via the `--config` command-line flag), the current working directory will be considered the project root.)\n\nAs an example, consider an alternative project structure, like:\n\n```text my_project ├── pyproject.toml └── lib └── my_package ├── __init__.py ├── foo.py └── bar.py ```\n\nIn this case, the `./lib` directory should be included in the `src` option (e.g., `src = [\"lib\"]`), such that when resolving imports, `my_package.foo` is considered first-party.\n\nThis field supports globs. For example, if you have a series of Python packages in a `python_modules` directory, `src = [\"python_modules/*\"]` would expand to incorporate all packages in that directory. User home directory and environment variables will also be expanded.", "type": [ "array", "null"