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

Separate module for Black imports #792

Merged
merged 2 commits into from
Jan 2, 2025
Merged

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented Jan 1, 2025

Thanks @jedie!

From a review comment to #744:

Maybe move all import from black into a own package and handle import error there? So it's guaranteed that the own error message from above will always appear?

So black_wrapper.py now first tries to import black and gives a nice error message if it doesn't succeed. Upon success, it then proceeds to importing needed internals from within Black.

@akaihola akaihola added the enhancement New feature or request label Jan 1, 2025
@akaihola akaihola self-assigned this Jan 1, 2025
@akaihola akaihola force-pushed the optional-black-improvement branch from ea2aa27 to e8ca107 Compare January 1, 2025 22:06
@akaihola akaihola force-pushed the optional-black-improvement branch 3 times, most recently from 47d45f7 to 95605ca Compare January 2, 2025 16:04
@akaihola akaihola force-pushed the optional-black-improvement branch from 95605ca to 3a715ab Compare January 2, 2025 16:55
@akaihola akaihola changed the title Small improvement to Black being an optional dependency Separate module for Black imports Jan 2, 2025
@akaihola akaihola merged commit d3f96a2 into master Jan 2, 2025
37 of 38 checks passed
@akaihola akaihola deleted the optional-black-improvement branch January 2, 2025 19:43
@akaihola akaihola mentioned this pull request Jan 2, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

1 participant