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.
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
[doc] Apply black on the documentation where it makes sense #8650
[doc] Apply black on the documentation where it makes sense #8650
Changes from all commits
c9ed6c2
2360f9e
e4f17ec
c792735
e7ba0a0
7402131
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can't we re-use this like we do with
&fixtures
and pass it in thepre-commit
config?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.
What need to be in sync is the
-l 103
, black only looks atpyproject.toml
so we have to give the option like this. (Alternatively we could use the default value, it's not super important.).I don't think the exclude can be reused, this is the list of the message that black can fix automatically, it's really specific to black.
It's also a very useful list btw ! I'm considering to recover it automatically and generalize it to autofixxer (isort, autoflake, and ruff), in order to use this information directly in our doc for #8579
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.
I.e. if applying a tool on
doc/data
makes the tests fail on am/my-message/bad.py
file, then the tool autofixmy-message
. We might have to use it on functional tests instead for complicated fixes like ruff or autoflake to check which use cases is autofixed or not, but for black on the doc is enough and you get the idea.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.
Yeah, let's use the default then. Less config == better imo
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.
I'm going to need to rebase and rewrite black from zero, it's not THAT good with comment after all 😄
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.
Shall we merge this and do another PR that removes the config?
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.
No, it breaks the comments to go back to 88 char per line after doing 103 char per line, it's a lot easier to do it from scratch again :)