Open gdalle opened 2 years ago
It's possible I guess you would detect a python string and then shell out to black or whatever formatter. There's a bunch of other things that are a higher priority than something like this though so I wouldn't hold my breath this is implemented anytime soon. I would be open to a PR if it made sense. It would probably work similarly to how docstrings are formatted.
Hi! First of all, thanks for this amazing formatter, which brings me daily joy. I recently started working with PyCall.jl to embed Python routines inside Julia files. When I format these files, only the Julia parts are modified, as expected. However, given the popularity of Python and the good compatibility between both languages, I wondered if this could change. I think it might make sense to add an option calling external Python formatters (such as black) on the parts of the code that look like
or
What are your thoughts on this?