8 comments

  • maratc 9 minutes ago
    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, "y": 42, "z": 2}  # Answer to the Ultimate Question!
    
    Which completely misses the writer's intent. But did you notice that there are two spaces before the pound now?

    The actual problems in the code I work with are not the spaces at the end of line or imports in non-alphabetic order, it's the 10-line list comprehensions that are so long that they're impossible for me to parse. None of these tools catch that. My place used pylint, flake8, black, ruff -- with hundreds of commits on every change. All that energy could be better spent elsewhere.

    • jbvlkt 2 minutes ago
      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.
  • gempir 13 minutes ago
    I wish Go had something like Ruff! A lot of languages are getting amazing tool but Go has a very fragmented ecosystem with a lot of tools but none of them feel as high quality has the likes of Ruff, Oxc, Biome or even PHP's Mago
  • woadwarrior01 1 hour ago
    Great to see ruff, ty and uv being actively developed, even after Astral was acquired by OpenAI.
  • kstenerud 1 hour ago
    This is great news! With the advent of agentic coding, strong linting is more important than ever. What I'd really like to see is forbidigo for more languages.
    • alentred 41 minutes ago
      100% agree, I am upgrading my projects now. And yet, I have mixed feelings about this. I like to think that when I (was) writing code myself, I applied a great deal of intuition to decide when to skip or ignore some rule. On the hand, I also saw projects were developers where using pylint with most rules enabled and I have to say the code was not better - on the contrary it had plenty of hacks to make pylint happy at the cost of illegible code.

      Not unlike that experience, I also saw coding agents spend lots of tokens trying to fix a benign issue, as well as doing the opposite - like disabling the tests !!! when they don't pass. :facepalm:

      I grew to trust AI results in terms of overall correctness, but I still have hard time trusting their *judgement* on the *code quality*.

  • hyeongjun 43 minutes ago
    Good news. enabling 413 rules by default means most projects get useful linting without touching the config at all!
    • embedding-shape 29 minutes ago
      Maybe it's just me, but getting overrun with "413 x potential warnings" hardly sounds useful :) Great for greenfield, less so for existing projects. Although nowadays, fire up your agent with "/goal work through and address all lint warnings by fixing the code according to XYZ" and leave it alone for a couple of hours and I guess it's no longer an issue...

      Don't get me wrong, the new level of details coming from Ruff is much appreciated and a good thing :)

  • vanyaland 34 minutes ago
    ran 0.16 on a file with no config, it flags unsorted imports and `except Exception` by default now
  • bbor 41 minutes ago

      Ruff v0.16 has a small number of breaking changes
    
    Why. Why must my poor semver be hurt so!

    I sorta kinda get why `ty` is pre v1.0.0 -- it's a typechecker that doesn't check a huge number of types. But what are we waiting for with `ruff`? Surely it's eaten whatever the old options were (black? maybe a few takes on py+lint?) by now many times over, and is even more dominant than `uv`.

    I run this program hundreds of times a day so I'm generally excited for new features, but I guess the OAI acquisition has made me ornery when it comes to these folks. Apologies to kindly nerds who made this release happen, and congrats <3

    • colinmarc 11 minutes ago
      It's conventional for semver to allow breaking changes for 0.x minor releases (but not for patch releases).