News for hackers. Stuff that matters.
Re:Even the Pylint codebase uses Ruff by zzzeek on Sunday March 05, 2023 @09:12PM (#35036713)
just tried it and this is immensely fast.

too bad it doesn't appear to support flake8 plugins and only has a small subset hardcoded into it. if it could support arbitrary flake8 plugins I would move SQLAlchemy to this tool immediately.

the main reason people want to move off flake8 is not so much a speed issue but that its author refuses to allow it to use pyproject.toml files for configuration, meaning every project's configuration has to remain half-broken using obsolete setup.cfg files. A very silly situation.

Re:Even the Pylint codebase uses Ruff by emptysea on Sunday March 05, 2023 @09:29PM (#35036823)
yeah that pyproject.toml issue is really annoying with flake8, made me glad to switch to ruff even though it doesn't have all the same lints available
Re:Even the Pylint codebase uses Ruff by charliermarsh on Sunday March 05, 2023 @10:00PM (#35037045)
Yeah we don't support arbitrary Flake8 plugins. We do plan to support plugins eventually but the exact architecture and API are TBD.

If there are plugins that would be particularly impactful for you, I'd be happy to take a look at adding them. (We support some of the plugins you use in SQLAlchemy, like flake8-docstrings and flake8-builtins, but not flake8-rst-docstrings which I'm guessing is a blocker.)

Re:Even the Pylint codebase uses Ruff by zzzeek on Sunday March 05, 2023 @10:18PM (#35037148)
thanks for the reply! we use a bunch of goofy ones that nobody else does. one of them is like a 3 line plugin that has only a handful of stars on github.

      flake8-import-order
      flake8-builtins
      flake8-future-annotations
      flake8-docstrings
      flake8-rst-docstrings
      flake8-import-single
Re:Even the Pylint codebase uses Ruff by charliermarsh on Sunday March 05, 2023 @10:31PM (#35037235)
Oh heh yeah I saw flake8-import-single :)

That might be equivalent to using Ruff's isort implementation with `force_single_line` but maybe that comes with other implications that you don't want for SQLAlchemy.

Re:Even the Pylint codebase uses Ruff by zzzeek on Sunday March 05, 2023 @11:08PM (#35037431)
I really tried to use isort but it doesnt do the import order style that we use, and there were some other things that didnt work for us. flake8-import-order has selectable styles that I match in my own "zimports" tool that we use to actually write our imports. flake8-import-single then adds this extra idea that you shouldn't have "from tool import x, y, z", since that defeats the purpose import sorting which is to avoid merge artifacts.
Re:Even the Pylint codebase uses Ruff by clepto on Monday March 06, 2023 @01:07AM (#35037988)
Are smaller plugins like this potentially an easy place for first time contributors to work in?

My Rust skills are certainly very lacking but if there is some big list of arbitrary flake8 plugins that there is a desire to have ported, that sounds like it could be a relatively easy place to get one’s feet wet.

Re:Even the Pylint codebase uses Ruff by selestify on Sunday March 05, 2023 @10:40PM (#35037286)
What’s the reasoning behind refusing to use pyproject.toml?
Re:Even the Pylint codebase uses Ruff by shosca on Sunday March 05, 2023 @11:04PM (#35037410)
Re:Even the Pylint codebase uses Ruff by zzzeek on Sunday March 05, 2023 @11:09PM (#35037435)
it's utterly ridiculous and has all the indications of a maintainer who was grumpy about making a change (a place I know *very well*, I am there multiple times a week myself), and now as it's gone on for years, they no longer can really back down from their original "complaints" even though they are absurd at this point.
Re:Even the Pylint codebase uses Ruff by fastball on Monday March 06, 2023 @09:29AM (#35041409)
The good news is some maintainers can have a change of heart. I seem to remember there being a certain someone who thought asyncio python was pointless, but now SQLAlchemy has asyncio support and that's super cool!
Re:Even the Pylint codebase uses Ruff by zzzeek on Tuesday March 07, 2023 @07:58PM (#35063759)
haha that's because i figured out a cool way to do it that wouldnt ruin my life.

pyproject thing, he just doesn't want to "give in", there's zero technical issue

Re:Even the Pylint codebase uses Ruff by clepto on Monday March 06, 2023 @12:57AM (#35037936)
I maintain a few open source libraries and we have recently switched to Ruff from Flake8 exclusively because of the lack of pyproject.toml support.

These are relatively speaking small codebases, and the speed improvements really don’t make a difference for us, but with trying to get our own projects in line with current standards flake8’s refusal to support it was the final nail in the coffin.

I think the point was reasonable when pyproject.toml first came about and parsing it was a bit more of a Wild West, I can certainly understand the unwillingness to try and support it then. Now with Python itself having toml support in the standard library, and every other major tool standardizing on it, not to mention TOML being the de-facto config file for Rust projects. It just seems like a bizarre hill to die on to me now.

It’s not as if the work hasn’t been done, there are forks of flake8 with pyproject.toml support, but as far I’m aware multiple PRs with support for it have been denied.