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

Allow flagging of multiline implicit string concatenations #2117

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jan 24, 2023

At present, ISC001 and ISC002 flag concatenations like the following:

"a" "b"  # ISC001
"a" \
  "b"  # ISC002

However, multiline concatenations are allowed.

This PR adds a setting:

[tool.ruff.flake8-implicit-str-concat]
allow-multiline = false

Which extends ISC002 to also flag multiline concatenations, like:

(
  "a"  # ISC002
  "b"
)

Note that this is backwards compatible, as allow-multiline defaults to true.

@charliermarsh charliermarsh merged commit cc63a4b into main Jan 24, 2023
@charliermarsh charliermarsh deleted the charlie/implicit branch January 24, 2023 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant