Add pyproject.toml to include option doc (#5080)

Fixes an oversight where i didn't update this initially
This commit is contained in:
konstin 2023-06-14 17:55:12 +02:00 committed by GitHub
parent c1fd2c8a8e
commit 916f0889f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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<bool>,
#[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<Vec<String>>,

2
ruff.schema.json generated
View File

@ -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"