diff --git a/README.md b/README.md index 59c1edb7f1..a72eb2f6aa 100644 --- a/README.md +++ b/README.md @@ -1981,6 +1981,10 @@ from .utils import ( ) ``` +Note that this setting is only effective when combined with `combine-as-imports = true`. +When `combine-as-imports` isn't enabled, every aliased `import from` will be given its +own line, in which case, wrapping is not necessary. + **Default value**: `false` **Type**: `bool` @@ -1990,6 +1994,7 @@ from .utils import ( ```toml [tool.ruff.isort] force-wrap-aliases = true +combine-as-imports = true ``` --- diff --git a/src/isort/settings.rs b/src/isort/settings.rs index 5086a0fe74..a64f81bef0 100644 --- a/src/isort/settings.rs +++ b/src/isort/settings.rs @@ -32,11 +32,16 @@ pub struct Options { test_id as test_id ) ``` + + Note that this setting is only effective when combined with `combine-as-imports = true`. + When `combine-as-imports` isn't enabled, every aliased `import from` will be given its + own line, in which case, wrapping is not necessary. "#, default = r#"false"#, value_type = "bool", example = r#" force-wrap-aliases = true + combine-as-imports = true "# )] pub force_wrap_aliases: Option,