-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Added not formatting files in gitignore (psf#1682) #1734
Conversation
@@ -33,6 +33,8 @@ You can also explicitly specify the path to a particular file that you want with | |||
If you're running with `--verbose`, you will see a blue message if a file was found and | |||
used. | |||
|
|||
Files listed within a projects `.gitignore` file will not be formatted by _Black_. |
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.
Files listed within a projects `.gitignore` file will not be formatted by _Black_. | |
Files listed within a project's `.gitignore` file will not be formatted by _Black_. |
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.
Also this doesn't seem the right place for this text—the section is about finding pyproject.toml
.
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 see your point @JelleZijlstra. After looking through the docs further, I believe the best place to insert this information may be within this statement, which is mentioning areas that will not be formatted:
Please let me know if you agree and I'll fix up this pull request. Thanks.
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 guess that's an option, or we could have a new section on skipping formatting in general.
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.
As this is my first time contributing to open source, how is the best way to look at doing that? Do we look to get agreement on a new section being the best way forward first? I'd love the opportunity to write this section. Just want to make sure I'm doing it the right way. Thanks for your help.
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.
Sorry for not getting back to you on this. Honestly our configuration is a bit of a mess, with a lot of top-level pages for relatively minor things. I feel like a nicer way to do it would be to rename the pyproject.toml section to "Configuration" and cover gitignore as well as other ways to configure or silence Black, like # format: off
comments.
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 filed #1759 to discuss reorganizing the docs more broadly.
Going to merge this for now; we can put it somewhere else when we reorganize the documentation. |
Added statement to the docs to highlight that Black will not format files listed in the
.gitignore
of a project.