mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 20:39:13 +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)
|
||||
|
||||
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`).
|
||||
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`).
|
||||
|
||||
**Default value**: `false`
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@
|
|||
}
|
||||
},
|
||||
"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": [
|
||||
"boolean",
|
||||
"null"
|
||||
|
|
|
@ -255,10 +255,9 @@ pub struct Options {
|
|||
"#
|
||||
)]
|
||||
/// 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`).
|
||||
/// 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`).
|
||||
pub ignore_init_module_imports: Option<bool>,
|
||||
#[option(
|
||||
default = "88",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue