Fix bad documentation message for init option

This commit is contained in:
Charlie Marsh 2023-01-22 19:25:23 -05:00
parent 8d46d3bfa6
commit f40ae943a7
3 changed files with 7 additions and 9 deletions

View file

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

View file

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

View file

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