mirror of https://github.com/astral-sh/ruff
Improve `extend` docs (#21135)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
0c2cf75869
commit
9d7da914b9
|
|
@ -59,13 +59,20 @@ pub struct Options {
|
||||||
)]
|
)]
|
||||||
pub cache_dir: Option<String>,
|
pub cache_dir: Option<String>,
|
||||||
|
|
||||||
/// A path to a local `pyproject.toml` file to merge into this
|
/// A path to a local `pyproject.toml` or `ruff.toml` file to merge into this
|
||||||
/// configuration. User home directory and environment variables will be
|
/// configuration. User home directory and environment variables will be
|
||||||
/// expanded.
|
/// expanded.
|
||||||
///
|
///
|
||||||
/// To resolve the current `pyproject.toml` file, Ruff will first resolve
|
/// To resolve the current configuration file, Ruff will first load
|
||||||
/// this base configuration file, then merge in any properties defined
|
/// this base configuration file, then merge in properties defined
|
||||||
/// in the current configuration file.
|
/// in the current configuration file. Most settings follow simple override
|
||||||
|
/// behavior where the child value replaces the parent value. However,
|
||||||
|
/// rule selection (`lint.select` and `lint.ignore`) has special merging
|
||||||
|
/// behavior: if the child configuration specifies `lint.select`, it
|
||||||
|
/// establishes a new baseline rule set and the parent's `lint.ignore`
|
||||||
|
/// rules are discarded; if the child configuration omits `lint.select`,
|
||||||
|
/// the parent's rule selection is inherited and both parent and child
|
||||||
|
/// `lint.ignore` rules are accumulated together.
|
||||||
#[option(
|
#[option(
|
||||||
default = r#"null"#,
|
default = r#"null"#,
|
||||||
value_type = "str",
|
value_type = "str",
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
"deprecated": true
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"extend": {
|
"extend": {
|
||||||
"description": "A path to a local `pyproject.toml` file to merge into this\nconfiguration. User home directory and environment variables will be\nexpanded.\n\nTo resolve the current `pyproject.toml` file, Ruff will first resolve\nthis base configuration file, then merge in any properties defined\nin the current configuration file.",
|
"description": "A path to a local `pyproject.toml` or `ruff.toml` file to merge into this\nconfiguration. User home directory and environment variables will be\nexpanded.\n\nTo resolve the current configuration file, Ruff will first load\nthis base configuration file, then merge in properties defined\nin the current configuration file. Most settings follow simple override\nbehavior where the child value replaces the parent value. However,\nrule selection (`lint.select` and `lint.ignore`) has special merging\nbehavior: if the child configuration specifies `lint.select`, it\nestablishes a new baseline rule set and the parent's `lint.ignore`\nrules are discarded; if the child configuration omits `lint.select`,\nthe parent's rule selection is inherited and both parent and child\n`lint.ignore` rules are accumulated together.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue