Ruff – an fast Python Linter written in Rust

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • ruff

    An extremely fast Python linter and code formatter, written in Rust.

  • As much as I'd love the headline to be accurate (we use pylint and friends extensively) I think the comparision is pre-mature.

    The linters the author is comparing against have significantly more features an more overhead given they need to support many more complex rules/situations, also I'd argue this linter is far from well organized given it seems all checks appear to be implemented in a flat file [1].

    I would not be surprised if a fully fledged linter written in rust outperforms any linter written in python by a factor of 20-25x though.

    I'd be curious to see functionality & performance comparisions if this project continues.

    [1] https://github.com/charliermarsh/ruff/blob/0b9e3f8b472dc3fd0...

  • The project is testing for 9 rules. https://gitlab.com/zapier/team-integrations/zapier-platform-... Will you add more with plugins in cargo? DSL? Python? It's not much comparable to anything right now

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • black

    The uncompromising Python code formatter

  • And you never will. From https://github.com/psf/black:

    Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.

  • pytype

    A static type analyzer for Python code

  • pytype dev here - thanks for the kind words :) whole-program analysis on unannotated or partially-annotated code is our particular focus, but there's surprisingly little dark PLT magic involved; in particular you don't need to be an academic type theory wizard to understand how it works. our developer docs[1] have more info, but at a high level we have an interpreter that virtually executes python bytecode, tracking types where the cpython interpreter would have tracked values.

    it's worth exploring some of the other type checkers as well, since they make different tradeoffs - in particular, microsoft's pyright[2] (written in typescript!) can run incrementally within vscode, and tends to add new and experimentally proposed typing PEPs faster than we do.

    [1] https://github.com/google/pytype/blob/main/docs/developers/i...

  • pyright

    Static Type Checker for Python

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts