Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofix ISC001 (single-line-implicit-string-concatenation) #4829

Closed
tkukushkin opened this issue Jun 3, 2023 · 2 comments · Fixed by #4853
Closed

Autofix ISC001 (single-line-implicit-string-concatenation) #4829

tkukushkin opened this issue Jun 3, 2023 · 2 comments · Fixed by #4853
Assignees
Labels
fixes Related to suggested fixes for violations

Comments

@tkukushkin
Copy link
Contributor

ISC001 could have an autofixer. It can be difficult to combine strings of different kinds, but it shouldn't be difficult to combine strings of the same kind, so, IMHO, it would be ok to fix only such cases.

@charliermarsh charliermarsh added the fixes Related to suggested fixes for violations label Jun 4, 2023
@saippuakauppias
Copy link

Totally agree, autofix could make it easier to fix this kind of code

@tkukushkin
Copy link
Contributor Author

Trying to write autofixer by myself

tkukushkin added a commit to tkukushkin/ruff that referenced this issue Jun 4, 2023
tkukushkin added a commit to tkukushkin/ruff that referenced this issue Jun 4, 2023
charliermarsh pushed a commit that referenced this issue Jun 12, 2023
## Summary

This PR adds autofixer for rule ISC001 in cases where both string
literals are of the same kind and with same quotes (double / single).

Fixes #4829

## Test Plan

I added testcases with different combinations of string literals.
konstin pushed a commit that referenced this issue Jun 13, 2023
## Summary

This PR adds autofixer for rule ISC001 in cases where both string
literals are of the same kind and with same quotes (double / single).

Fixes #4829

## Test Plan

I added testcases with different combinations of string literals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants