From f40ae943a7553eca091d1c00d48ee9bb22bea5ac Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 22 Jan 2023 19:25:23 -0500 Subject: [PATCH] Fix bad documentation message for init option --- README.md | 7 +++---- ruff.schema.json | 2 +- src/settings/options.rs | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ee06f76b6b..2a62219a69 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/ruff.schema.json b/ruff.schema.json index bda3ed907d..b763fc62fb 100644 --- a/ruff.schema.json +++ b/ruff.schema.json @@ -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" diff --git a/src/settings/options.rs b/src/settings/options.rs index bd94f6e026..0540028111 100644 --- a/src/settings/options.rs +++ b/src/settings/options.rs @@ -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, #[option( default = "88",