If Ruff were to implement a full type inference engine—comparable in depth to astroid—performance would necessarily degrade, though not necessarily to Pylint's level. Several outcomes are plausible:
Even a highly optimized Rust implementation of a full astroid-like system would likely be:
10x–30x faster than Pylint, at best,
2x–10x faster in more complex multi-module cases with rich type hints,
But still far slower than current Ruff without inference.
The key factors that would erode Ruff’s speed edge:
Recursive import resolution and cross-module tracking,
Deep attribute and method resolution (e.g., obj.attr.foo() chain analysis),
Context-aware inference (e.g., type narrowing in conditionals),
Possible fallback to interpreting stub files (.pyi) or runtime inspection.
Unless the Ruff team adopts very conservative, localized inference strategies, any addition of deep inference would be a major architectural shift.
I think this response is better focused and less wordy but that's probably because of my boilerplate prompt. Otherwise they are both pretty decent.That's very interesting and I tried your exact queries with ChatGPT (free version). One difference: I usually prefix my sessions with this bit of boilerplate, which I got by asking the chatbot what prompt would reduce its sycophant, hallucination, and redundancy tendencies:Answer this as a skeptical expert would, minimizing speculation and avoiding any attempt to affirm or reassure me. If the answer requires assumptions, state them explicitly. If you don’t know or can’t verify something, say so clearly. I want a strictly factual and critical analysis, not an optimistic or polished summary.
Here's the part of the transcript I got using Edward's prompts.
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS3sE26TnhC9uvT1AQ9tLGwXeg2FsbtP-gsMSx5d%2BKkRew%40mail.gmail.com.
I'm not sure types are that relevant to Ruff, Astral is building Ty as their type checker: https://github.com/astral-sh/ty
On Thu, Jul 3, 2025 at 11:45 AM Ville M. Vainio <viva...@gmail.com> wrote:I'm not sure types are that relevant to Ruff, Astral is building Ty as their type checker: https://github.com/astral-sh/ty
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/leo-editor/cb8cfade-b411-4aff-aca1-d4cd692bdfa4n%40googlegroups.com.
Astral team has a very good track record, so there's no doubt that Ty will be the type checker people will be using, just like everyone standardized on Ruff. The deal with type checkers is that they can be useful even if they don't catch everything, as you can disable the checks that are not ready.