From 916f0889f860d80c4257dace70c5f6a21eaf4e96 Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 14 Jun 2023 17:55:12 +0200 Subject: [PATCH] Add pyproject.toml to include option doc (#5080) Fixes an oversight where i didn't update this initially --- crates/ruff/src/settings/options.rs | 6 ++++-- ruff.schema.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/ruff/src/settings/options.rs b/crates/ruff/src/settings/options.rs index 7c99dd8a2c..7015b29b60 100644 --- a/crates/ruff/src/settings/options.rs +++ b/crates/ruff/src/settings/options.rs @@ -288,7 +288,7 @@ pub struct Options { /// re-exported with a redundant alias (e.g., `import os as os`). pub ignore_init_module_imports: Option, #[option( - default = r#"["*.py", "*.pyi"]"#, + default = r#"["*.py", "*.pyi", "**/pyproject.toml"]"#, value_type = "list[str]", example = r#" include = ["*.py"] @@ -297,7 +297,9 @@ pub struct Options { /// A list of file patterns to include when linting. /// /// Inclusion are based on globs, and should be single-path patterns, like - /// `*.pyw`, to include any file with the `.pyw` extension. + /// `*.pyw`, to include any file with the `.pyw` extension. `pyproject.toml` is + /// included here not for configuration but because we lint whether e.g. the + /// `[project]` matches the schema. /// /// For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax). pub include: Option>, diff --git a/ruff.schema.json b/ruff.schema.json index d7d091bb3f..e0342d8e3e 100644 --- a/ruff.schema.json +++ b/ruff.schema.json @@ -355,7 +355,7 @@ ] }, "include": { - "description": "A list of file patterns to include when linting.\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).", + "description": "A list of file patterns to include when linting.\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension. `pyproject.toml` is included here not for configuration but because we lint whether e.g. the `[project]` matches the schema.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).", "type": [ "array", "null"