jaraco / skeleton

A generic project skeleton for Python projects.
http://blog.jaraco.com/skeleton/
MIT License
123 stars 36 forks source link

Apply `preview` setting to ruff formatter #108

Closed DimitriPapadopoulos closed 9 months ago

DimitriPapadopoulos commented 10 months ago

It is currently required by the following setting:

quote-style = "preserve"

From https://docs.astral.sh/ruff/settings/#format-quote-style:

  • preserve (preview only): Keeps the existing quote character. We don't recommend using this option except for projects that already use a mixture of single and double quotes and can't migrate to using double or single quotes.

Fixes https://github.com/jaraco/skeleton/pull/99#discussion_r1465308024.

jaraco commented 9 months ago

I found the same issue. I was noticing that since we hadn't (yet) enabled formatting in the test suite, it was not breaking not to have this setting. I was hand-adding ruff format --preview when running locally and hoping the preview flag would be unnecessary before I had to add it, but I was recently employing it in an editor and had the same issue, so I made the same change in 29e5d34af962e59e92c501ebb988dcaf192b114e.