{"slug": "ruff", "name": "Ruff", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "Fast Python linter and code formatter written in Rust, made by Astral.", "recommenders": 15, "commenters": 18, "warners": 0, "score": 14.4, "rising": 0.4, "first": "2025-11-30", "latest": "2026-10-24", "why": "HN commenters like Ruff for fast Python linting and formatting in a single tool and as a standard check that coding agents are told to run.", "why_is_quote": false, "has_verdict": true, "sentiment": {"recommend": 15, "neutral": 4, "compare": 0, "warn": 0}, "spark": [1, 0, 5, 1, 0, 0, 0, 0, 4, 1, 0, 3], "listed": true, "loved": ["Speed", "Linting and formatting"], "caveat": "Fragmented CLI", "short_quote": "uv and ruff took over because they were in many ways simpler and much faster than the competition.", "icon": true, "domain": null, "github_repo": "github.com/astral-sh/ruff", "official_url": "https://docs.astral.sh/ruff/", "pricing": "open source", "aliases": ["Ruff", "ruff"], "verdict": [{"text": "HN commenters like Ruff for fast Python linting and formatting in a single tool", "cites": [{"id": 746984928, "item_id": 46686558, "url": "https://news.ycombinator.com/item?id=46686558", "by": "kingkongjaffa", "date": "2026-01-19", "stance": "recommend", "quote": "Ruff solved python formatting and linting.", "excerpt": "Ruff solved python formatting and linting. uv solved packaging. Both were better in terms of user ergonomics and also much faster that what we used before, black, mypy, pylint etc. IDK it Typescript is too generic but TS made me think of javascript as a proper language and not something just to do silly little animations on websites for. Types unlock proper data modeling and application code to me. Figma and Figjam a", "context": "", "use_case": "Python formatting and linting", "switched_from": "black", "story": "Ask HN: What non-LLM tools have meaningfully improved your dev productivity?"}, {"id": 803521617, "item_id": 50220101, "url": "https://news.ycombinator.com/item?id=50220101", "by": "olive-n", "date": "2026-10-24", "stance": "recommend", "quote": "uv and ruff took over because they were in many ways simpler and much faster than the competition.", "excerpt": "The whole python tooling is experiencing kind of a renaissance with new Rust based tools taking over. These days all my project use uv for project management and ruff for linting and formatting. I believe there is no obvious default for type checking yet. I use whatever my IDE provides. So e.g. pylance in VSCode, which is build on pyright. There are currently pretty much 3 projects that I look out for: ty, zuban and ", "context": "", "use_case": "linting and formatting", "switched_from": "", "story": "Bringing uv and ty together"}, {"id": 784916945, "item_id": 49057309, "url": "https://news.ycombinator.com/item?id=49057309", "by": "gempir", "date": "2026-07-26", "stance": "recommend", "quote": "Ruff can lint in seconds or even sub second.", "excerpt": "I've been using golangci-lint for years, it's okay but it's slow even with a cache, as soon as you have good amount of lints enabled your ci can suddendly take minutes. That's not the fault of golangci-lint, it's just the concept of bringing together a bunch of different linters and keeping it fast is impossible. And the configuration is a bit wild too, because every linter obviously has their own decisions on how it", "context": "", "use_case": "linting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 745870369, "item_id": 46616898, "url": "https://news.ycombinator.com/item?id=46616898", "by": "sebtron", "date": "2026-01-14", "stance": "recommend", "quote": "I definitely appreciate a 16x speedup if possible.", "excerpt": "> Are people making user facing apps in rust with uis? We are talking not only about Rust, but also about C and C++. There are lots of C++ UI applications. Rust poses itself as an alternative to C++, so it is definitely intended to be used for UI applications too - it was created to write a browser! At work I am using tools such as uv [1] and ruff [2], which are user-facing (although not GUI), and I definitely apprec", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Is Rust faster than C?"}]}, {"text": " and as a standard check that coding agents are told to run.", "cites": [{"id": 802789088, "item_id": 50174318, "url": "https://news.ycombinator.com/item?id=50174318", "by": "throwaway219450", "date": "2026-10-20", "stance": "recommend", "quote": "With agents it is helpful to make them run ruff and mypy to keep them honest", "excerpt": "I was talking about a function with 100 lines and no line breaks. Very difficult to read. I use black/ruff on a lot of projects and it will only touch standard-y things like docstring spacing, or spacing between methods and classes, import sorting etc. It doesn\u2019t touch intentional/aesthetic user spacing. With agents it is helpful to make them run ruff and mypy to keep them honest, but as long as the code adheres to t", "context": "", "use_case": "Python linting/formatting with agents", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}, {"id": 751426579, "item_id": 46964161, "url": "https://news.ycombinator.com/item?id=46964161", "by": "speedgoose", "date": "2026-02-10", "stance": "recommend", "quote": "or ruff in Python", "excerpt": "I don't mind tabs or spaces, and I don't even know what I use in a given project. I use the defaults from rustfmt in rust, eslint or biome in TypeScript/JavaScript, or ruff in Python. I also have some .editorconfig files so my editor is automatically configured correctly. Importantly, I do tell the agents to always run the linters and use the auto-formatters if needed. They get it. Don't make them format code, it's s", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Ask HN: Am I holding it wrong?"}]}, {"text": " Complaints are few: one commenter finds the CLI fragmented across ruff and uv,", "cites": [{"id": 803509121, "item_id": 50219320, "url": "https://news.ycombinator.com/item?id=50219320", "by": "assumed_throwaw", "date": "2026-10-24", "stance": "neutral", "quote": "I love Astral\u2019s tools, but I wonder why the CLI feels so fragmented.", "excerpt": "I love Astral\u2019s tools, but I wonder why the CLI feels so fragmented. - Now, ty is integrated into uv, while ty is technically being part of ruff [1], but ruff is not integrated into uv. - The formatter is part of ruff, but uv also have an undocumented \"format\" command, which does not produce the same results. - Actually, ruff is integrated into uv, but you must call it through \"uv tool run ruff\". I guess I'd like \"uv", "context": "", "use_case": "Python linting and formatting", "switched_from": "", "story": "Bringing uv and ty together"}]}, {"text": " and another says agents get confused when ruff changes files outside their context.", "cites": [{"id": 802767520, "item_id": 50172970, "url": "https://news.ycombinator.com/item?id=50172970", "by": "rsfern", "date": "2026-10-20", "stance": "neutral", "quote": "I use ruff and my agents get confused if I edit and run ruff out of band.", "excerpt": "Doesn\u2019t this mess up the context though? I use ruff and my agents get confused if I edit and run ruff out of band. How do people deal with that? I\u2019m always having to remind agents to re-read files because they\u2019ve changed", "context": "", "use_case": "Python linting/formatting with agents", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}]}], "praise": [{"label": "Speed", "summary": "Commenters say Ruff is much faster than older Python tools and can lint in seconds or less.", "quotes": [{"id": 784916945, "item_id": 49057309, "url": "https://news.ycombinator.com/item?id=49057309", "by": "gempir", "date": "2026-07-26", "stance": "recommend", "quote": "Ruff can lint in seconds or even sub second.", "excerpt": "I've been using golangci-lint for years, it's okay but it's slow even with a cache, as soon as you have good amount of lints enabled your ci can suddendly take minutes. That's not the fault of golangci-lint, it's just the concept of bringing together a bunch of different linters and keeping it fast is impossible. And the configuration is a bit wild too, because every linter obviously has their own decisions on how it", "context": "", "use_case": "linting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 745870369, "item_id": 46616898, "url": "https://news.ycombinator.com/item?id=46616898", "by": "sebtron", "date": "2026-01-14", "stance": "recommend", "quote": "I definitely appreciate a 16x speedup if possible.", "excerpt": "> Are people making user facing apps in rust with uis? We are talking not only about Rust, but also about C and C++. There are lots of C++ UI applications. Rust poses itself as an alternative to C++, so it is definitely intended to be used for UI applications too - it was created to write a browser! At work I am using tools such as uv [1] and ruff [2], which are user-facing (although not GUI), and I definitely apprec", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Is Rust faster than C?"}, {"id": 746984928, "item_id": 46686558, "url": "https://news.ycombinator.com/item?id=46686558", "by": "kingkongjaffa", "date": "2026-01-19", "stance": "recommend", "quote": "Ruff solved python formatting and linting.", "excerpt": "Ruff solved python formatting and linting. uv solved packaging. Both were better in terms of user ergonomics and also much faster that what we used before, black, mypy, pylint etc. IDK it Typescript is too generic but TS made me think of javascript as a proper language and not something just to do silly little animations on websites for. Types unlock proper data modeling and application code to me. Figma and Figjam a", "context": "", "use_case": "Python formatting and linting", "switched_from": "black", "story": "Ask HN: What non-LLM tools have meaningfully improved your dev productivity?"}]}, {"label": "Linting and formatting", "summary": "One tool replaces black, pylint and similar tools, and commenters call it a default in their setups.", "quotes": [{"id": 746984928, "item_id": 46686558, "url": "https://news.ycombinator.com/item?id=46686558", "by": "kingkongjaffa", "date": "2026-01-19", "stance": "recommend", "quote": "Ruff solved python formatting and linting.", "excerpt": "Ruff solved python formatting and linting. uv solved packaging. Both were better in terms of user ergonomics and also much faster that what we used before, black, mypy, pylint etc. IDK it Typescript is too generic but TS made me think of javascript as a proper language and not something just to do silly little animations on websites for. Types unlock proper data modeling and application code to me. Figma and Figjam a", "context": "", "use_case": "Python formatting and linting", "switched_from": "black", "story": "Ask HN: What non-LLM tools have meaningfully improved your dev productivity?"}, {"id": 803521617, "item_id": 50220101, "url": "https://news.ycombinator.com/item?id=50220101", "by": "olive-n", "date": "2026-10-24", "stance": "recommend", "quote": "uv and ruff took over because they were in many ways simpler and much faster than the competition.", "excerpt": "The whole python tooling is experiencing kind of a renaissance with new Rust based tools taking over. These days all my project use uv for project management and ruff for linting and formatting. I believe there is no obvious default for type checking yet. I use whatever my IDE provides. So e.g. pylance in VSCode, which is build on pyright. There are currently pretty much 3 projects that I look out for: ty, zuban and ", "context": "", "use_case": "linting and formatting", "switched_from": "", "story": "Bringing uv and ty together"}, {"id": 788258016, "item_id": 49266126, "url": "https://news.ycombinator.com/item?id=49266126", "by": "usef-", "date": "2026-08-11", "stance": "recommend", "quote": "Virtually every modern python developer uses an auto formatter today, and never needs to think about it (ruff, black).", "excerpt": "Virtually every modern python developer uses an auto formatter today, and never needs to think about it (ruff, black). It's not ambiguous and is immediately visible if something has the wrong indent. (I often wish other languages I use had formatters as good and standard as the Python ecosystem)", "context": "", "use_case": "Python auto-formatting", "switched_from": "", "story": "Mojo 1.0 Is Here"}]}, {"label": "Sensible formatting", "summary": "It keeps commented items on their own lines and leaves intentional spacing alone.", "quotes": [{"id": 784979424, "item_id": 49061214, "url": "https://news.ycombinator.com/item?id=49061214", "by": "brewmarche", "date": "2026-07-26", "stance": "recommend", "quote": "ruff sees your line comment and keeps each item on its line.", "excerpt": "FWIW, ruff sees your line comment and keeps each item on its line. It only adds a trailing comma and additional space. It also does not collapse lines when there\u2019s a trailing comma. Your output seems to be from black. IMO it\u2019s insane to collapse lines when there are line comments. $ uvx ruff format --diff formatting.py --- formatting.py +++ formatting.py @@ -1,8 +1,4 @@ -no_comma = { - \"x\": 3, - \"y\": 42, - \"z\": 2 -} ", "context": "", "use_case": "Python formatting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 802789088, "item_id": 50174318, "url": "https://news.ycombinator.com/item?id=50174318", "by": "throwaway219450", "date": "2026-10-20", "stance": "recommend", "quote": "With agents it is helpful to make them run ruff and mypy to keep them honest", "excerpt": "I was talking about a function with 100 lines and no line breaks. Very difficult to read. I use black/ruff on a lot of projects and it will only touch standard-y things like docstring spacing, or spacing between methods and classes, import sorting etc. It doesn\u2019t touch intentional/aesthetic user spacing. With agents it is helpful to make them run ruff and mypy to keep them honest, but as long as the code adheres to t", "context": "", "use_case": "Python linting/formatting with agents", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}, {"id": 784923616, "item_id": 49057726, "url": "https://news.ycombinator.com/item?id=49057726", "by": "cyberrock", "date": "2026-07-26", "stance": "recommend", "quote": "Personally I love this rule because it saves me from looking at one extra commit", "excerpt": "I think all of us have worked on code that other people thought was perfect or will never change. Personally I love this rule because it saves me from looking at one extra commit (adding the comma when the next value gets added) when I'm trying dig through line history.", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}]}, {"label": "Agent guardrails", "summary": "Commenters have coding agents run Ruff to keep generated code consistent.", "quotes": [{"id": 802789088, "item_id": 50174318, "url": "https://news.ycombinator.com/item?id=50174318", "by": "throwaway219450", "date": "2026-10-20", "stance": "recommend", "quote": "With agents it is helpful to make them run ruff and mypy to keep them honest", "excerpt": "I was talking about a function with 100 lines and no line breaks. Very difficult to read. I use black/ruff on a lot of projects and it will only touch standard-y things like docstring spacing, or spacing between methods and classes, import sorting etc. It doesn\u2019t touch intentional/aesthetic user spacing. With agents it is helpful to make them run ruff and mypy to keep them honest, but as long as the code adheres to t", "context": "", "use_case": "Python linting/formatting with agents", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}, {"id": 751426579, "item_id": 46964161, "url": "https://news.ycombinator.com/item?id=46964161", "by": "speedgoose", "date": "2026-02-10", "stance": "recommend", "quote": "or ruff in Python", "excerpt": "I don't mind tabs or spaces, and I don't even know what I use in a given project. I use the defaults from rustfmt in rust, eslint or biome in TypeScript/JavaScript, or ruff in Python. I also have some .editorconfig files so my editor is automatically configured correctly. Importantly, I do tell the agents to always run the linters and use the auto-formatters if needed. They get it. Don't make them format code, it's s", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Ask HN: Am I holding it wrong?"}, {"id": 791945120, "item_id": 49496570, "url": "https://news.ycombinator.com/item?id=49496570", "by": "miki123211", "date": "2026-08-30", "stance": "neutral", "quote": "I therefore build one (imperfectly, based on ruff lints), but it solved the problem entirely.", "excerpt": "I view types as \"the thing that prevents programmers and agents alike from writing bad and incorrect code in the future\". They're a way of encoding invariants that doesn't require the programmer to worry about accidentally breaking them (because breaking the invariant will cause a compiler error). Types are not the only way to encode such invariants. tests (and to a smaller extend lints and agent hooks) are other suc", "context": "Works on an internal system with coding agents", "use_case": "custom lint to catch agent mistakes", "switched_from": "", "story": "Functional State Machines in Rust: Typestate and Newtype Patterns"}]}, {"label": "Reusable crates", "summary": "Its Rust parser and AST crates are reused by other projects for their speed.", "quotes": [{"id": 743715648, "item_id": 46482228, "url": "https://news.ycombinator.com/item?id=46482228", "by": "zeapo", "date": "2026-01-03", "stance": "recommend", "quote": "I used rust 'cause of Ruff. They have an outstanding set of crates", "excerpt": "Glad you like it. I used rust 'cause of Ruff. They have an outstanding set of crates https://github.com/astral-sh/ruff/tree/main/crates The ones I use: - python_parser, allows me to load the python source code and detect any parsing errors (returned to the frontend) - python_ast, allows me to extract the identifiers (variable names, function names, etc) - python_semantic, allows to do scope analysis and understand re", "context": "built Weft", "use_case": "Python parsing and scope analysis", "switched_from": "Python ast and symtable", "story": "Show HN: Weft \u2013 A reactive and interactive Python experience"}, {"id": 784978657, "item_id": 49061166, "url": "https://news.ycombinator.com/item?id=49061166", "by": "westurner", "date": "2026-07-26", "stance": "neutral", "quote": "Ruff's AST which is fast", "excerpt": "TIL RustPython uses Ruff's AST which is fast. LibCST can modify the AST/CST to do python codemod, now in Rust too; rustpython-ruff_python_parser: https://crates.io/crates/rustpython-ruff_python_parser .. https://github.com/astral-sh/ruff LibCST: https://github.com/Instagram/LibCST", "context": "", "use_case": "Python parsing", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}]}, {"label": "Code quality rules", "summary": "Newer rule sets caught issues that earlier versions missed.", "quotes": [{"id": 784914128, "item_id": 49057133, "url": "https://news.ycombinator.com/item?id=49057133", "by": "nickjj", "date": "2026-07-26", "stance": "recommend", "quote": "the new rules do improve code quality. It caught quite a few things previous versions didn't.", "excerpt": "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/9af66d31f98bef841588effe7e1288395d6f7bce (Re-enable line length) https://", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}]}], "caveats": [{"label": "Fragmented CLI", "summary": "Ruff, ty and uv split commands awkwardly, and uv's format command gives different results.", "quotes": [{"id": 803509121, "item_id": 50219320, "url": "https://news.ycombinator.com/item?id=50219320", "by": "assumed_throwaw", "date": "2026-10-24", "stance": "neutral", "quote": "I love Astral\u2019s tools, but I wonder why the CLI feels so fragmented.", "excerpt": "I love Astral\u2019s tools, but I wonder why the CLI feels so fragmented. - Now, ty is integrated into uv, while ty is technically being part of ruff [1], but ruff is not integrated into uv. - The formatter is part of ruff, but uv also have an undocumented \"format\" command, which does not produce the same results. - Actually, ruff is integrated into uv, but you must call it through \"uv tool run ruff\". I guess I'd like \"uv", "context": "", "use_case": "Python linting and formatting", "switched_from": "", "story": "Bringing uv and ty together"}]}, {"label": "Agent context", "summary": "Running Ruff outside an agent's loop changes files and confuses the agent.", "quotes": [{"id": 802767520, "item_id": 50172970, "url": "https://news.ycombinator.com/item?id=50172970", "by": "rsfern", "date": "2026-10-20", "stance": "neutral", "quote": "I use ruff and my agents get confused if I edit and run ruff out of band.", "excerpt": "Doesn\u2019t this mess up the context though? I use ruff and my agents get confused if I edit and run ruff out of band. How do people deal with that? I\u2019m always having to remind agents to re-read files because they\u2019ve changed", "context": "", "use_case": "Python linting/formatting with agents", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}]}], "who": [{"by": "miki123211", "context": "Python programmer", "url": "https://news.ycombinator.com/item?id=50221672", "date": "2026-10-24"}, {"by": "zeapo", "context": "built Weft", "url": "https://news.ycombinator.com/item?id=46482228", "date": "2026-01-03"}], "tags": ["for Python developers", "for AI coding agents", "for Django projects", "for Rust tool builders"], "use_cases": ["python linting", "python linting and formatting", "python linting/formatting with agents", "linting", "linting and formatting", "custom lint to catch agent mistakes"], "compared": [{"slug": "uv", "name": "uv", "co": 8, "switched_from": 0, "switched_to": 0}, {"slug": "black", "name": "Black", "co": 4, "switched_from": 1, "switched_to": 0}, {"slug": "ty", "name": "ty", "co": 6, "switched_from": 0, "switched_to": 0}, {"slug": "mypy", "name": "mypy", "co": 3, "switched_from": 0, "switched_to": 0}, {"slug": "pyrefly", "name": "Pyrefly", "co": 3, "switched_from": 0, "switched_to": 0}, {"slug": "prettier", "name": "Prettier", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49056112", "title": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59", "mentions": 5}, {"url": "https://news.ycombinator.com/item?id=50172962", "title": "Bringing uv and ty together", "mentions": 3}, {"url": "https://news.ycombinator.com/item?id=50108717", "title": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=46678980", "title": "Ask HN: What non-LLM tools have meaningfully improved your dev productivity?", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49492368", "title": "Functional State Machines in Rust: Typestate and Newtype Patterns", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49261128", "title": "Mojo 1.0 Is Here", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1}, "2025-12": {}, "2026-01": {"recommend": 5}, "2026-02": {"recommend": 1}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {"recommend": 4, "neutral": 1}, "2026-08": {"recommend": 1, "neutral": 1}, "2026-09": {}, "2026-10": {"neutral": 2, "recommend": 3}}, "quotes": [{"id": 803546753, "item_id": 50221672, "url": "https://news.ycombinator.com/item?id=50221672", "by": "miki123211", "date": "2026-10-24", "stance": "recommend", "quote": "I think Ruff is great", "excerpt": "I am a Python programmer. I love Astral; I think Ruff is great and uv is life-changing, but I don't actually like ty that much. I want my type checker to check types and to scream at me when it can't. I don't want it to do \"gradual typing\", if it is unsure about what type something is, I want that to be a failure instead of it modeling the unsureness and not showing potential errors. We live in the age of agents, hav", "context": "Python programmer", "use_case": "Python linting", "switched_from": "", "story": "Bringing uv and ty together"}, {"id": 803521617, "item_id": 50220101, "url": "https://news.ycombinator.com/item?id=50220101", "by": "olive-n", "date": "2026-10-24", "stance": "recommend", "quote": "uv and ruff took over because they were in many ways simpler and much faster than the competition.", "excerpt": "The whole python tooling is experiencing kind of a renaissance with new Rust based tools taking over. These days all my project use uv for project management and ruff for linting and formatting. I believe there is no obvious default for type checking yet. I use whatever my IDE provides. So e.g. pylance in VSCode, which is build on pyright. There are currently pretty much 3 projects that I look out for: ty, zuban and ", "context": "", "use_case": "linting and formatting", "switched_from": "", "story": "Bringing uv and ty together"}, {"id": 803509121, "item_id": 50219320, "url": "https://news.ycombinator.com/item?id=50219320", "by": "assumed_throwaw", "date": "2026-10-24", "stance": "neutral", "quote": "I love Astral\u2019s tools, but I wonder why the CLI feels so fragmented.", "excerpt": "I love Astral\u2019s tools, but I wonder why the CLI feels so fragmented. - Now, ty is integrated into uv, while ty is technically being part of ruff [1], but ruff is not integrated into uv. - The formatter is part of ruff, but uv also have an undocumented \"format\" command, which does not produce the same results. - Actually, ruff is integrated into uv, but you must call it through \"uv tool run ruff\". I guess I'd like \"uv", "context": "", "use_case": "Python linting and formatting", "switched_from": "", "story": "Bringing uv and ty together"}, {"id": 802789088, "item_id": 50174318, "url": "https://news.ycombinator.com/item?id=50174318", "by": "throwaway219450", "date": "2026-10-20", "stance": "recommend", "quote": "With agents it is helpful to make them run ruff and mypy to keep them honest", "excerpt": "I was talking about a function with 100 lines and no line breaks. Very difficult to read. I use black/ruff on a lot of projects and it will only touch standard-y things like docstring spacing, or spacing between methods and classes, import sorting etc. It doesn\u2019t touch intentional/aesthetic user spacing. With agents it is helpful to make them run ruff and mypy to keep them honest, but as long as the code adheres to t", "context": "", "use_case": "Python linting/formatting with agents", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}, {"id": 802767520, "item_id": 50172970, "url": "https://news.ycombinator.com/item?id=50172970", "by": "rsfern", "date": "2026-10-20", "stance": "neutral", "quote": "I use ruff and my agents get confused if I edit and run ruff out of band.", "excerpt": "Doesn\u2019t this mess up the context though? I use ruff and my agents get confused if I edit and run ruff out of band. How do people deal with that? I\u2019m always having to remind agents to re-read files because they\u2019ve changed", "context": "", "use_case": "Python linting/formatting with agents", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}, {"id": 791945120, "item_id": 49496570, "url": "https://news.ycombinator.com/item?id=49496570", "by": "miki123211", "date": "2026-08-30", "stance": "neutral", "quote": "I therefore build one (imperfectly, based on ruff lints), but it solved the problem entirely.", "excerpt": "I view types as \"the thing that prevents programmers and agents alike from writing bad and incorrect code in the future\". They're a way of encoding invariants that doesn't require the programmer to worry about accidentally breaking them (because breaking the invariant will cause a compiler error). Types are not the only way to encode such invariants. tests (and to a smaller extend lints and agent hooks) are other suc", "context": "Works on an internal system with coding agents", "use_case": "custom lint to catch agent mistakes", "switched_from": "", "story": "Functional State Machines in Rust: Typestate and Newtype Patterns"}, {"id": 788258016, "item_id": 49266126, "url": "https://news.ycombinator.com/item?id=49266126", "by": "usef-", "date": "2026-08-11", "stance": "recommend", "quote": "Virtually every modern python developer uses an auto formatter today, and never needs to think about it (ruff, black).", "excerpt": "Virtually every modern python developer uses an auto formatter today, and never needs to think about it (ruff, black). It's not ambiguous and is immediately visible if something has the wrong indent. (I often wish other languages I use had formatters as good and standard as the Python ecosystem)", "context": "", "use_case": "Python auto-formatting", "switched_from": "", "story": "Mojo 1.0 Is Here"}, {"id": 784979424, "item_id": 49061214, "url": "https://news.ycombinator.com/item?id=49061214", "by": "brewmarche", "date": "2026-07-26", "stance": "recommend", "quote": "ruff sees your line comment and keeps each item on its line.", "excerpt": "FWIW, ruff sees your line comment and keeps each item on its line. It only adds a trailing comma and additional space. It also does not collapse lines when there\u2019s a trailing comma. Your output seems to be from black. IMO it\u2019s insane to collapse lines when there are line comments. $ uvx ruff format --diff formatting.py --- formatting.py +++ formatting.py @@ -1,8 +1,4 @@ -no_comma = { - \"x\": 3, - \"y\": 42, - \"z\": 2 -} ", "context": "", "use_case": "Python formatting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 784978657, "item_id": 49061166, "url": "https://news.ycombinator.com/item?id=49061166", "by": "westurner", "date": "2026-07-26", "stance": "neutral", "quote": "Ruff's AST which is fast", "excerpt": "TIL RustPython uses Ruff's AST which is fast. LibCST can modify the AST/CST to do python codemod, now in Rust too; rustpython-ruff_python_parser: https://crates.io/crates/rustpython-ruff_python_parser .. https://github.com/astral-sh/ruff LibCST: https://github.com/Instagram/LibCST", "context": "", "use_case": "Python parsing", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 784923616, "item_id": 49057726, "url": "https://news.ycombinator.com/item?id=49057726", "by": "cyberrock", "date": "2026-07-26", "stance": "recommend", "quote": "Personally I love this rule because it saves me from looking at one extra commit", "excerpt": "I think all of us have worked on code that other people thought was perfect or will never change. Personally I love this rule because it saves me from looking at one extra commit (adding the comma when the next value gets added) when I'm trying dig through line history.", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 784916945, "item_id": 49057309, "url": "https://news.ycombinator.com/item?id=49057309", "by": "gempir", "date": "2026-07-26", "stance": "recommend", "quote": "Ruff can lint in seconds or even sub second.", "excerpt": "I've been using golangci-lint for years, it's okay but it's slow even with a cache, as soon as you have good amount of lints enabled your ci can suddendly take minutes. That's not the fault of golangci-lint, it's just the concept of bringing together a bunch of different linters and keeping it fast is impossible. And the configuration is a bit wild too, because every linter obviously has their own decisions on how it", "context": "", "use_case": "linting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 784914128, "item_id": 49057133, "url": "https://news.ycombinator.com/item?id=49057133", "by": "nickjj", "date": "2026-07-26", "stance": "recommend", "quote": "the new rules do improve code quality. It caught quite a few things previous versions didn't.", "excerpt": "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/9af66d31f98bef841588effe7e1288395d6f7bce (Re-enable line length) https://", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 751426579, "item_id": 46964161, "url": "https://news.ycombinator.com/item?id=46964161", "by": "speedgoose", "date": "2026-02-10", "stance": "recommend", "quote": "or ruff in Python", "excerpt": "I don't mind tabs or spaces, and I don't even know what I use in a given project. I use the defaults from rustfmt in rust, eslint or biome in TypeScript/JavaScript, or ruff in Python. I also have some .editorconfig files so my editor is automatically configured correctly. Importantly, I do tell the agents to always run the linters and use the auto-formatters if needed. They get it. Don't make them format code, it's s", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Ask HN: Am I holding it wrong?"}, {"id": 748723988, "item_id": 46795249, "url": "https://news.ycombinator.com/item?id=46795249", "by": "senko", "date": "2026-01-28", "stance": "recommend", "quote": "I immediately set up up ruff, ty, pytest, pre-commit hook", "excerpt": "Some more Django recommendations from Frank Wiles of Revsys (Django consultancy): https://frankwiles.com/questions/starting-django-projects/ I'll add a few of my own: * Set up the project using uv * I name the django project \"project\"; so settings are project/settings.py, main urls are project/urls.py, etc * I always define a custom Django user model even if I don't need anything extra yet; easier to expand later * s", "context": "", "use_case": "linting", "switched_from": "", "story": "Notes on Starting to Use Django"}, {"id": 746994865, "item_id": 46687179, "url": "https://news.ycombinator.com/item?id=46687179", "by": "primaprashant", "date": "2026-01-19", "stance": "recommend", "quote": "big fan of uv and ruff and recently ty", "excerpt": "yeah, big fan of uv and ruff and recently ty. It's also from astral and it fixed type checking. You should check it out", "context": "", "use_case": "Python linting and formatting", "switched_from": "", "story": "Ask HN: What non-LLM tools have meaningfully improved your dev productivity?"}, {"id": 746984928, "item_id": 46686558, "url": "https://news.ycombinator.com/item?id=46686558", "by": "kingkongjaffa", "date": "2026-01-19", "stance": "recommend", "quote": "Ruff solved python formatting and linting.", "excerpt": "Ruff solved python formatting and linting. uv solved packaging. Both were better in terms of user ergonomics and also much faster that what we used before, black, mypy, pylint etc. IDK it Typescript is too generic but TS made me think of javascript as a proper language and not something just to do silly little animations on websites for. Types unlock proper data modeling and application code to me. Figma and Figjam a", "context": "", "use_case": "Python formatting and linting", "switched_from": "black", "story": "Ask HN: What non-LLM tools have meaningfully improved your dev productivity?"}, {"id": 745870369, "item_id": 46616898, "url": "https://news.ycombinator.com/item?id=46616898", "by": "sebtron", "date": "2026-01-14", "stance": "recommend", "quote": "I definitely appreciate a 16x speedup if possible.", "excerpt": "> Are people making user facing apps in rust with uis? We are talking not only about Rust, but also about C and C++. There are lots of C++ UI applications. Rust poses itself as an alternative to C++, so it is definitely intended to be used for UI applications too - it was created to write a browser! At work I am using tools such as uv [1] and ruff [2], which are user-facing (although not GUI), and I definitely apprec", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Is Rust faster than C?"}, {"id": 743715648, "item_id": 46482228, "url": "https://news.ycombinator.com/item?id=46482228", "by": "zeapo", "date": "2026-01-03", "stance": "recommend", "quote": "I used rust 'cause of Ruff. They have an outstanding set of crates", "excerpt": "Glad you like it. I used rust 'cause of Ruff. They have an outstanding set of crates https://github.com/astral-sh/ruff/tree/main/crates The ones I use: - python_parser, allows me to load the python source code and detect any parsing errors (returned to the frontend) - python_ast, allows me to extract the identifiers (variable names, function names, etc) - python_semantic, allows to do scope analysis and understand re", "context": "built Weft", "use_case": "Python parsing and scope analysis", "switched_from": "Python ast and symtable", "story": "Show HN: Weft \u2013 A reactive and interactive Python experience"}, {"id": 737627218, "item_id": 46101701, "url": "https://news.ycombinator.com/item?id=46101701", "by": "bbor", "date": "2025-11-30", "stance": "recommend", "quote": "This newly-minted fanboy recommends you try out ty w/ uv & ruff!", "excerpt": "Over the past few months, I've switched a few decently-sized python codebases from MyPy (which I used for years) to PyreFly (because the MyPy LSP ecosystem is somewhere between crumbling and deprecated at this point), and finally to Ty after it left beta this week. I'm now running a fully Astral-ized (rust-ized!) setup: 1. packaging with uv (instead of pip or poetry), 2. type checking with ty (instead of the default ", "context": "", "use_case": "Python linting", "switched_from": "", "story": "Ty \u2013 A fast Python type checker, written in Rust"}]}