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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/pyproject_toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Please note `blackd` will not use `pyproject.toml` configuration.

## Configuration format
Expand Down