Always allow explicit multi-line concatenations when implicit are banned (#12532)

## Summary

Closes https://github.com/astral-sh/ruff/issues/11582.
This commit is contained in:
Charlie Marsh 2024-07-26 10:36:35 -04:00 committed by GitHub
parent 1fe4a5faed
commit 49f51583fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 27 additions and 62 deletions

View file

@ -1260,10 +1260,11 @@ pub struct Flake8ImplicitStrConcatOptions {
/// allowed (but continuation lines, delimited with a backslash, are
/// prohibited).
///
/// Note that setting `allow-multiline = false` should typically be coupled
/// with disabling `explicit-string-concatenation` (`ISC003`). Otherwise,
/// both explicit and implicit multiline string concatenations will be seen
/// as violations.
/// Setting `allow-multiline = false` will automatically disable the
/// `explicit-string-concatenation` (`ISC003`) rule. Otherwise, both
/// implicit and explicit multiline string concatenations would be seen
/// as violations, making it impossible to write a linter-compliant multiline
/// string.
#[option(
default = r#"true"#,
value_type = "bool",