-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
STYLE: replace unwanted-patterns-strings-to-concatenate with ruff #51613
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
STYLE: replace unwanted-patterns-strings-to-concatenate with ruff #51613
Conversation
asv_bench/benchmarks/io/csv.py
Outdated
@@ -318,7 +318,8 @@ def setup(self, sep, decimal, float_precision): | |||
"".join([random.choice(string.digits) for _ in range(28)]) | |||
for _ in range(15) | |||
] | |||
rows = sep.join([f"0{decimal}" + "{}"] * 3) + "\n" | |||
row = "".join([f"0{decimal}", "{}"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
Would it work to do
rows = sep.join([f"0{decimal}{{}}"] * 3) + "\n"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, it works nicely. I corrected my PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some "".join(...)
calls which could be simplified but I also wouldn't mind keeping them as-is (that way it might be clearer that they represent different rows in the Series/DataFrame).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me on green, do you want to mark as ready for review?
I resolved the merge conflict and updated my branch. |
Thank you @natmokval! |
Unwanted-patterns-strings-to-concatenate
replaced with ruff.