mirror of https://github.com/astral-sh/ruff
## 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> |
||
|---|---|---|
| .. | ||
| resources | ||
| src | ||
| Cargo.toml | ||