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

Add --extend-exclude parameter #2005

Merged
merged 10 commits into from Mar 1, 2021
Merged

Conversation

thejcannon
Copy link
Contributor

Adding the --extend-exclude parameter to add additional exclude regexes on top of the --exclude regexes. This is especially useful if you want to specify additional files/directories on top of the very useful default ones (as demonstrated by the change to our own pyproject.toml).

The parameter name also matches flake8's parameter of --extend-exclude.


Fixes #1571

@ichard26 ichard26 self-requested a review February 24, 2021 21:45
@ichard26
Copy link
Collaborator

To be clear, I want to do a review and already have a comment in mind, but I unfortunately don't have time to put it in words right now, so I would appreciate holding off on the merge for the time being. Thanks!

Copy link
Collaborator

@ichard26 ichard26 left a comment

Choose a reason for hiding this comment

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

Approving the changes generally, but there are a few nits and minor issues that would be nice to have resolved :)

I was going to complain about how someone can pass both --exclude and --extend-exclude at the same and how it would be confusing, buuuutttt... after some more thinking, there's some valid use cases for this configuration design.

Thanks for submitting an excellent PR! Thank you for the time investment, it really helps out the project. Why not add yourself to the AUTHORS list at the end of the README?

tests/test_black.py Outdated Show resolved Hide resolved
src/black/__init__.py Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
thejcannon and others added 6 commits February 28, 2021 15:02
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@JelleZijlstra
Copy link
Collaborator

@ichard26 are you OK with merging this now? We can handle the click callbacks for regexes in a separate PR (as you said above). Thanks for your work @thejcannon!

Copy link
Collaborator

@ichard26 ichard26 left a comment

Choose a reason for hiding this comment

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

@JelleZijlstra LGTM! Thanks for checking in with me, you didn't have to. Thanks @thejcannon for the good work!

Look ma! I contribute to open source!

p.s. thanks for the little fun you portrayed in this commit message, it's a little light in what's a very dark day for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please offer a way to exclude dirs *in addition to the default exclusions*
3 participants