mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 04:19:43 +00:00
Fix bad documentation message for init option
This commit is contained in:
parent
8d46d3bfa6
commit
f40ae943a7
3 changed files with 7 additions and 9 deletions
|
@ -2221,10 +2221,9 @@ ignore = ["F841"]
|
||||||
#### [`ignore-init-module-imports`](#ignore-init-module-imports)
|
#### [`ignore-init-module-imports`](#ignore-init-module-imports)
|
||||||
|
|
||||||
Avoid automatically removing unused imports in `__init__.py` files. Such
|
Avoid automatically removing unused imports in `__init__.py` files. Such
|
||||||
imports will still be +flagged, but with a dedicated message
|
imports will still be flagged, but with a dedicated message suggesting
|
||||||
suggesting that the import is either added to the module' +`__all__`
|
that the import is either added to the module's `__all__` symbol, or
|
||||||
symbol, or re-exported with a redundant alias (e.g., `import os as
|
re-exported with a redundant alias (e.g., `import os as os`).
|
||||||
os`).
|
|
||||||
|
|
||||||
**Default value**: `false`
|
**Default value**: `false`
|
||||||
|
|
||||||
|
|
|
@ -259,7 +259,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ignore-init-module-imports": {
|
"ignore-init-module-imports": {
|
||||||
"description": "Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be +flagged, but with a dedicated message suggesting that the import is either added to the module' +`__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).",
|
"description": "Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be flagged, but with a dedicated message suggesting that the import is either added to the module's `__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).",
|
||||||
"type": [
|
"type": [
|
||||||
"boolean",
|
"boolean",
|
||||||
"null"
|
"null"
|
||||||
|
|
|
@ -255,10 +255,9 @@ pub struct Options {
|
||||||
"#
|
"#
|
||||||
)]
|
)]
|
||||||
/// Avoid automatically removing unused imports in `__init__.py` files. Such
|
/// Avoid automatically removing unused imports in `__init__.py` files. Such
|
||||||
/// imports will still be +flagged, but with a dedicated message
|
/// imports will still be flagged, but with a dedicated message suggesting
|
||||||
/// suggesting that the import is either added to the module' +`__all__`
|
/// that the import is either added to the module's `__all__` symbol, or
|
||||||
/// symbol, or re-exported with a redundant alias (e.g., `import os as
|
/// re-exported with a redundant alias (e.g., `import os as os`).
|
||||||
/// os`).
|
|
||||||
pub ignore_init_module_imports: Option<bool>,
|
pub ignore_init_module_imports: Option<bool>,
|
||||||
#[option(
|
#[option(
|
||||||
default = "88",
|
default = "88",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue