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

Add flake8-implicit-str-concat check to Ruff #36597

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

josh-fell
Copy link
Contributor

@josh-fell josh-fell commented Jan 4, 2024

This check was enabled initially in #23873, but hasn't been part of the Ruff checks to-date. Let's add it!

pyproject.toml Outdated Show resolved Hide resolved
@o-nikolas
Copy link
Contributor

Other than one comment, looks good to me! Love this one ❤️

@potiuk
Copy link
Member

potiuk commented Jan 4, 2024

Other than one comment, looks good to me! Love this one ❤️

Likewise :)

Copy link
Member

@pankajkoti pankajkoti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, just wondering how those string concatenations existed in so many places :) maybe it was another pre-commit responsible for it.

@potiuk
Copy link
Member

potiuk commented Jan 4, 2024

nice, just wondering how those string concatenations existed in so many places :) maybe it was another pre-commit responsible for it.

We used to get rid of them by flake I think - but at the time we moved to ruff it was not available as far as I remember.
And those strings are created by black reformatting - for example when you remove if and the whole block gets de-dented - the previously split strings (because they were too long) are moved to one line. But black (and ruff-black follows it) has the rule that it never EVER changes the AST so concatenating two strings is not possible in ruff.

That's the root cause we had so many of those.

And yes. I got far too many of those as well and it started to be annoying :)

This was enabled initially in apache#23873, but hasn't been part of the Ruff checks to-date. Let's add it!
@josh-fell josh-fell merged commit 1cc9fe1 into apache:main Jan 5, 2024
74 checks passed
@josh-fell josh-fell deleted the ruff-isc branch January 5, 2024 14:22
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jan 10, 2024
@ephraimbuddy ephraimbuddy added this to the Airflow 2.9.0 milestone Jan 10, 2024
abhishekbhakat pushed a commit to abhishekbhakat/my_airflow that referenced this pull request Mar 5, 2024
This was enabled initially in apache#23873, but hasn't been part of the Ruff checks to-date. Let's add it!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:dev-tools area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) provider:amazon-aws AWS/Amazon - related issues provider:weaviate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants