ruff/crates/ruff_linter/resources/test
Prakhar Pratyush 492d676736
[`flake8-implicit-str-concat`] Avoid invalid fix generated by autofix (`ISC003`) (#21517)
## Summary

As reported in #19757:
While attempting ISC003 autofix for an expression with explicit string
concatenation, with either operand being a string literal that wraps
across multiple lines (in parentheses) - it resulted in generating a fix
which caused runtime error.

Example:
```
_ = "abc" + (
    "def"
    "ghi"
)
```
was being auto-fixed to:
```
_ = "abc" (
    "def"
    "ghi"
)
```
which raised `TypeError: 'str' object is not callable`

This commit makes changes to just report diagnostic - no autofix in such
cases.

Fixes #19757.

## Test Plan
Added example scenarios in
`crates/ruff_linter/resources/test/fixtures/flake8_implicit_str_concat/ISC.py`.

Signed-off-by: Prakhar Pratyush <prakhar1144@gmail.com>
2025-11-21 17:22:35 -08:00
..
fixtures [`flake8-implicit-str-concat`] Avoid invalid fix generated by autofix (`ISC003`) (#21517) 2025-11-21 17:22:35 -08:00
package Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
project Rename `ruff_cli` crate to `ruff` (#9557) 2024-01-16 17:47:01 -05:00
__init__.py [`pylint`] (Re-)Implement `import-private-name` (`C2701`) (#9553) 2024-01-16 14:03:11 -05:00
disallowed_rule_names.txt Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00