-
Notifications
You must be signed in to change notification settings - Fork 139
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
build(deps): update black to v23.9.1 #1000
Conversation
Overall this seems fine, I'll have a more detailed look tomorrow. I'm not really a huge fan of specific parts of string splitting - it's a bit too opinionated imo - but I know we don't get to pick and choose in the end. Black doesn't "equally" split strings, i.e. such that the resulting lines are approximately equal in length, which looks rather weird: # input
"View is not persistent. Items need to have a custom_id set and View must have no timeout"
# current output
"View is not persistent. Items need to have a custom_id set and View must have no"
" timeout" This can be fixed through manual review (black doesn't reformat literals that are already within line length limits), but it's not ideal. The preview style still has a couple issues with multiline strings in specific contexts, however we seemingly haven't hit them (yet), to be fair. Another thing is visual misalignment of multiline f-strings, as outlined here: psf/black#2915 (comment) |
While some of these changes are neat, updating this PR from black v23.3.0 to v23.9.1 adds another ~1k lines of changes, some of which partially revert changes originally made by v23.3.0. |
Changed the scope of this PR to only update black to 23.9.1 for now, which we need to be able to add |
lgtm |
Summary
Bump black to 23.3.0 and enable their preview style which contains new fixes. Their stability policy has new changes released once a year, but a lot of these changes made the code much more readable.
This moves us closer to being able to enable E501 (if we want), as a multitude of these changes move long strings onto multiple lines.
Checklist
pdm lint
pdm pyright