Live data from Hacker News

Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

astral.sh

41–50 of 247 posts

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#41
post #18
post #13

Earlier quoted context omitted.

Those tools actually save team energy. Without them any programmer has different opinion on formating, code quality, what is readable etc. You can discuss it endlesly or you can just use ruff.

We can replace the endless and useless discussion on how to format code with an endless and useless discussion on what linting tool to use. Another option would be to leave both topics alone and go on with our lives, improving the product, fixing bugs, implementing new features, and generally giving customers a better product and shareholders more value, while respectfully agreeing to disagree on the issues of style.

People tend to use tools set up in CICD and/or precommit. Without rules everyone uses their tool and is unwilling to compromise. Even if they are willing it is hard to setup tools to do exactly what you want. Default configuration is always the way.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#44
I updated a ~3k line Python project with this the other day. I was using v0.15.x beforehand. It didn't take too long and the new rules do improve code quality. It caught quite a few things previous versions didn't.

Here's a few commits of changes:

(A whole bunch of manual changes based on its suggestions) https://github.com/nickjj/plutus/commit/9af66d31f98bef841588...

(Re-enable line length) https://github.com/nickjj/plutus/commit/21789f89bbcee37913c1...

(Force _ prefix for unused variables) https://github.com/nickjj/plutus/commit/a272c77b932e1c78558a...

(Auto-corrected by Ruff) https://github.com/nickjj/plutus/commit/6fe69cf88385ebdf9b8c...

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#45
post #18
post #13

Earlier quoted context omitted.

Those tools actually save team energy. Without them any programmer has different opinion on formating, code quality, what is readable etc. You can discuss it endlesly or you can just use ruff.

We can replace the endless and useless discussion on how to format code with an endless and useless discussion on what linting tool to use. Another option would be to leave both topics alone and go on with our lives, improving the product, fixing bugs, implementing new features, and generally giving customers a better product and shareholders more value, while respectfully agreeing to disagree on the issues of style.

> We can replace the endless and useless discussion on how to format code with an endless and useless discussion on what linting tool to use.

That is why gofmt is so great. As the saying goes: gofmt’s style is nobody’s favorite, yet gofmt is everybody’s favorite.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#46
post #12

The amount of fascination that people have with these "grammar nazi" bots -- some of them implementing completely arbitrary "rules" and some of them disagreeing with others on what "good" Python code should look like -- doesn't stop to amaze me. Here's "bad" code: important_numbers = { 'x': 3, 'y': 42, # Answer to the Ultimate Question! 'z': 2 } Here's what "good" code should look like: important_numbers = {"x": 3, "…

The point of the "grammar nazi" bots is to focus on the actual problems: if a bot is deciding about linting, you don't have to waste brain power to discuss it in PRs. It is what it is, everyone gets the same, shut up and work on what matters. I'm surprised you consider it a lot of energy spent, I tend not to spend any on this, it just runs automatically on my code and I drop out of pretty much every discussions about…

Even better: if someone feels like the syntax must be different, they can pick it up at a centralized repository with more people that specialize in syntax.

Afterwards it will affect production code everywhere on the planet. :)

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#47
post #26

Earlier quoted context omitted.

I’m not entirely sure what you mean by a fragmented ecosystem? Go has first-party formatting and linting and the language is deliberately restricted to ensure it is written in a certain way, even when written by complete novices. Compare that to Python or TypeScript which are Wild West languages without opinionated first-party tooling, and it’s clear why Ruff/Biome feel great. You just wouldn’t get that same high wit…

Go has a good start for that, but It's not enough for me. Gofmt is a great idea but it isn't strict enough for my taste. Go does not have any first party static analyzers, closest is Staticcheck which is even sponsored by Google themselves

go vet, plus all the ones in gopls?

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#48
post #28

Earlier quoted context omitted.

I've never had discussions about code formatting in PRs, this seems like a made up problem or something that predates my career.

It's not by accident that tabs vs spaces is one of the stereotypical great debates in programming.

I've never seen this debate take place outside of internet forums, almost always as a joke. It's been about 15 years since I even remember it coming up much as a joke, frankly.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#49

Earlier quoted context omitted.

I've never had discussions about code formatting in PRs, this seems like a made up problem or something that predates my career.

These used to happen all the time. In one (otherwise great) programming course in university you would even get points subtracted if you did not follow the lecturer's preferred style. (I think that in their case it was partially because uniformity made correcting faster.)

At work? School isn't really representative.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#50
post #40

Earlier quoted context omitted.

I've never had discussions about code formatting in PRs, this seems like a made up problem or something that predates my career.

Silicon Valley (the TV show) memed about it with its tabs vs spaces bit. It used to be a thing for sure. It has been a good 10 or 15 years since I had such a discussion. Automated linting and formatting tools largely killed it in my experience.

I think the culture has just shifted. I haven't even sniffed a whiff these conversations since roughly 15 years ago. I've never, ever seen them at work.
Post reply on HN