From 0b55e8e4d6b1d42177fa2a50cbf265163727d69d Mon Sep 17 00:00:00 2001 From: Lucas Cimon <925560+Lucas-C@users.noreply.github.com> Date: Mon, 1 May 2023 22:24:12 +0200 Subject: [Doc] Improving implicit-str-concat/details.rst (#8649) Co-authored-by: Pierre Sassoulas --- doc/data/messages/i/implicit-str-concat/details.rst | 13 ++++++++++++- doc/data/messages/i/implicit-str-concat/related.rst | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 doc/data/messages/i/implicit-str-concat/related.rst diff --git a/doc/data/messages/i/implicit-str-concat/details.rst b/doc/data/messages/i/implicit-str-concat/details.rst index c1e136183..f09d48110 100644 --- a/doc/data/messages/i/implicit-str-concat/details.rst +++ b/doc/data/messages/i/implicit-str-concat/details.rst @@ -1,6 +1,5 @@ By default, detection of implicit string concatenation of line jumps is disabled. Hence the following code will not trigger this rule: -Hence the following code will not trigger this rule: .. code-block:: python @@ -13,3 +12,15 @@ In order to detect this case, you must enable `check-str-concat-over-line-jumps` [STRING_CONSTANT] check-str-concat-over-line-jumps = yes + +However, the drawback of this setting is that it will trigger false positive +for string parameters passed on multiple lines in function calls: + +.. code-block:: python + + warnings.warn( + "rotate() is deprecated and will be removed in a future release. " + "Use the rotation() context manager instead.", + DeprecationWarning, + stacklevel=3, + ) diff --git a/doc/data/messages/i/implicit-str-concat/related.rst b/doc/data/messages/i/implicit-str-concat/related.rst new file mode 100644 index 000000000..90d29dbdf --- /dev/null +++ b/doc/data/messages/i/implicit-str-concat/related.rst @@ -0,0 +1 @@ +- `Allowing parenthesized implicitly concatenated strings, to be more compatible with black `_ -- cgit v1.2.1