-
Notifications
You must be signed in to change notification settings - Fork 687
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
[v2.5] Backport use of the black
and isort
formatters
#4534
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Its only about ~5 seconds on my laptop with an empty cache. The complexity of dmypy to speed things up isn't worth it. Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit 9b2ddeb)
Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit 6a09797)
This is essentially so that 'black' and 'isort' in the coming commits don't mess up its grouping. Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit 16ade52)
Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit f51e009)
Black has been the standard Python formatter for a couple of years now. Use it the way we use gofmt. Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit ab9d109)
Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit e110ebf)
isort organizes your imports. It's the "goimports" to black's "gofmt". Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit cdc05e8)
Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit 00aba7d)
Signed-off-by: Luke Shumaker <[email protected]> (cherry picked from commit 98b84e3)
ad396af
to
6b68fd5
Compare
LanceEa
previously approved these changes
Sep 21, 2022
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.
lgtm
Resolved a merge conflict in |
Alice-Lilith
approved these changes
Sep 22, 2022
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 backporting this! 👨🍳
haq204
approved these changes
Sep 22, 2022
LanceEa
approved these changes
Sep 22, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The main changes in this PR are backporting #4313 (
black
) and #4315 (isort
); but to support that, it also backports #4294 and a commit from #4288.Backporting use of the Python code formatters should remove a lot of friction when copying changes between 2.x and 3.x.
Related Issues
(none)
Testing
(none)
Checklist
I made sure to update
CHANGELOG.md
. - no applicable changesRemember, the CHANGELOG needs to mention:
This is unlikely to impact how Ambassador performs at scale.
Remember, things that might have an impact at scale include:
My change is adequately tested.
Remember when considering testing:
I updated
DEVELOPING.md
with any any special dev tricks I had to use to work on this code efficiently.The changes in this PR have been reviewed for security concerns and adherence to security best practices.