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

Drop black dependency #759

Merged
merged 10 commits into from
Jan 1, 2025
Merged

Drop black dependency #759

merged 10 commits into from
Jan 1, 2025

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented Oct 19, 2024

This allows installing Darker without needing to install Black, and running e.g.

darker --formatter=none --isort
darker --formatter=none --flynt

and, once #744 has been merged, this will also work without needing to install Black:

darker --formatter=ruff

Before reviewing or merging this one:

@akaihola akaihola added the enhancement New feature or request label Oct 19, 2024
@akaihola akaihola self-assigned this Oct 19, 2024
@akaihola akaihola marked this pull request as draft October 19, 2024 17:37
src/darker/files.py Outdated Show resolved Hide resolved
src/darker/files.py Outdated Show resolved Hide resolved
@akaihola akaihola force-pushed the drop-black-dependency branch 9 times, most recently from b9d52cb to b3a0b24 Compare October 29, 2024 07:58
@akaihola
Copy link
Owner Author

akaihola commented Oct 29, 2024

@clintonsteiner, I removed Black as a hard dependency, and added darker[black] extras instead. Documentation has also been updated accordingly. The default formatter is still Black, and a helpful error message is displayed if Black is needed but not installed.

The one remaining pyupgrade warning I'd like to leave as is, since it's nice to have some "dogfooding" material for when Darker gets proper pyupgrade support (see #755).

@akaihola akaihola marked this pull request as ready for review October 29, 2024 12:57
@akaihola akaihola force-pushed the drop-black-dependency branch from b3a0b24 to cf33b50 Compare December 31, 2024 23:03
@akaihola akaihola force-pushed the drop-black-dependency branch 2 times, most recently from 216d160 to 98a4990 Compare January 1, 2025 14:28
@akaihola akaihola marked this pull request as draft January 1, 2025 14:32
@akaihola akaihola force-pushed the drop-black-dependency branch from 98a4990 to 93aebe6 Compare January 1, 2025 20:26
@akaihola akaihola marked this pull request as ready for review January 1, 2025 20:33
@akaihola akaihola merged commit dc7cb4d into master Jan 1, 2025
37 of 38 checks passed
@akaihola akaihola deleted the drop-black-dependency branch January 1, 2025 20:37
@akaihola akaihola added the many-formatters Support for multiple code formatters and skipping formatting label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request many-formatters Support for multiple code formatters and skipping formatting
Projects
Development

Successfully merging this pull request may close these issues.

2 participants