Cleaned up configuration for isort and black#43
Closed
JonathanWenger wants to merge 5 commits intomainfrom
Closed
Conversation
Collaborator
Author
|
It seems like there are some inconsistencies in the import formatting in the current library. Let me know if you're fine with me just reformatting the imports in this PR. |
Collaborator
|
How do you (and @gpleiss, @jacobrgardner) feel about using µfmt (https://ufmt.omnilib.dev/en/stable/)? This takes care of the conflicts between black and isort, we've been using it without issues in BoTorch for a long time now. |
Member
|
I am 100% in favor of any dev practices you all use for BoTorch :) |
Collaborator
|
Done in #56. |
This file contains hidden or 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
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.
In a Nutshell
Configuration between linters
isortandblackwas only handled in pre-commit hooks and could lead to conflicts.In Detail
When running pre-commit hooks and also locally installing black via the instructions in
CONTRIBUTING.mdone could end up with different versions / settings leading to reformatting from the pre-commit hooks every commit. I also fixed the exclusions in the pre-commit configuration along the way, since it was throwing warnings: