I’ve been using ruff to lint my python code for quite awhile now, I was pretty
early to jump on it after release. Some of my projects have had a nice
force-single-line setting and some have not. I dug into the docs and it was
not clear what I needed to make it work.
[tool.ruff]
select = ['I'] # you probably want others as well
[tool.ruff.isort]
force-single-line = true
Turns out I was missing Isort in the select list.
Posts tagged: linting
All posts with the tag "linting"
2 posts
latest post 2025-05-04
Publishing rhythm
Client Challenge
pypi.org [1]
Underrated python library to on board ruff, or just use it on a project where its not the norm. ruff claims that its 99.9% compatible with black and when you read through the known differences they are clearly edge case bugs in black.
See this page for more about the comparison to black https://docs.astral.sh/ruff/faq/#how-does-ruffs-formatter-compare-to-black
oh and I just noticed that it is maintianed by Charlie, and comes straight out of astral.
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://pypi.org/project/flake8-to-ruff/
[2]: /thoughts/