diffplug / diffplug/spotless

Better method for managing python black package

Open
#674 8 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
5.7k
Forks
561
Avg merge
1d 14h
Merged PRs (30d)
43

Description

We are able to call `black` by shelling out to it on the system path, and we are able to cache its results by enforcing a version check on the binary. However, if it isn't on the path, or the version is wrong, we just show a helpful error message and let the user figure it out from there:

https://github.com/diffplug/spotless/blob/608e128381c89260f8a38fba985415c1f962ec7b/lib/src/main/java/com/diffplug/spotless/python/BlackStep.java#L65-L66

It would be nice if we could handle this better, or at least have better instructions. There are a few python plugins in the gradle ecosystem, I'll reach out to them to see if they are interested.

Contributor guide

Open the contributing guide

Research direction

Start with BlackStep.java at the linked lines to understand the current system-path lookup, version check, and error message. Review the mentioned Gradle Python plugins before choosing an approach; done means missing or incompatible Black installations are handled better or have clearer instructions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.