You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Add support for python Black #403
The key thing needed to integrate with Spotless is a Function<String, String>. So if you can either
A) Write some python code that configures the formatter, then has a function that consumes a string and returns a string
B) Find some commandline flags which accomplishes this (e.g. read on stdin and write to stdout, or possibly read some tempfile and write back out to it)
then that's the first step. The second step is integrating python and JVM, for which I believe there are many alternatives.
Activity
nedtwigg commentedon May 23, 2019
The key thing needed to integrate with Spotless is a
Function<String, String>. So if you can eitherA) Write some python code that configures the formatter, then has a function that consumes a string and returns a string
B) Find some commandline flags which accomplishes this (e.g. read on stdin and write to stdout, or possibly read some tempfile and write back out to it)
then that's the first step. The second step is integrating python and JVM, for which I believe there are many alternatives.
rpdelaney commentedon Jun 24, 2020
black --code "$text"demo
nedtwigg commentedon Aug 25, 2020
Implemented in #672, shipped in
plugin-gradle 5.2.0(tweet), PR for maven is welcome. The setup experience could be better, we'll track that at #674.iemejia commentedon Aug 25, 2020
Great ! 👏 thanks!
nedtwigg commentedon Aug 25, 2020
@iemejia, @rpdelaney, do you have any feedback on what info would be helpful for the black docs: psf/black#1622