Skip to content
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

Merged
merged 1 commit into from
Apr 11, 2021

Conversation

J-Exodus
Copy link
Contributor

@J-Exodus J-Exodus commented Oct 2, 2020

Added statement to the docs to highlight that Black will not format files listed in the .gitignore of a project.

@@ -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_.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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_.

Copy link
Collaborator

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.

Copy link
Contributor Author

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:
Black docs insert point
Please let me know if you agree and I'll fix up this pull request. Thanks.

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

@ichard26 ichard26 added the T: documentation Improvements to the docs (e.g. new topic, correction, etc) label Mar 6, 2021
@JelleZijlstra
Copy link
Collaborator

Going to merge this for now; we can put it somewhere else when we reorganize the documentation.

@JelleZijlstra JelleZijlstra merged commit ea4e714 into psf:master Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: documentation Improvements to the docs (e.g. new topic, correction, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants