colablinter

IPython magics that run Ruff on Jupyter and Colab cells

An IPython extension for Jupyter and Google Colab that runs Ruff on notebook cells: %clautofix fixes, formats and sorts imports before every cell runs, %%clcheck prints a lint report for one cell, and %%clunsafefix applies Ruff's unsafe fixes, after which the cell executes as usual.

Trade-offs

  • Fixing happens before execution, so cells run in their formatted form without leaving the notebook, at the cost of code changing on its own while autofix is on.
  • Unsafe fixes that can change behavior are kept behind a separate cell magic rather than the default.

Q&A1

Yes, once the extension is loaded; %clautofix off turns it off and on brings it back.

Reviews

Loading reviews

    More in Ruff

    See all 4 →
    • polyOne Rust binary that lints and formats about 30 languages
    • codehoundPython static analyzer for async and correctness bugs that pass review
    • CytoScnPyRust static analyzer for Python dead code, security issues and quality metrics
    • PymetricaArchitecture-aware code metrics for Python codebases

    More in Linters & formatters

    See all 19 →
    • MigrationPilotPostgreSQL migration linter that blocks unsafe DDL before merge
    • augurPolicy-based linter for OpenTelemetry Collector configurations
    • alintLinter for repository structure, files and config values
    • jev-specCLI that fails the build when code drifts from its Markdown spec
    • CatalystOpsEditor extension that catches PySpark performance problems before they run
    • ArityLanguage server, formatter and linter for R

    More in Python

    See all 162 →
    • jobdGPU-aware job broker for a few personal machines, with an MCP server
    • RaspiMIDIHubRaspberry Pi as a plug-and-play USB MIDI hub with virtual instruments
    • blitcpFile copier that reads in disk order, dedupes and streams over raw SSH
    • gnss_gpuGPU GNSS positioning for urban canyons with particle filters and ray-traced NLOS
    • SnitchPer-app network monitor and outbound firewall for the desktop
    • HisabDouble-entry ledger kept by texting a WhatsApp agent, in Urdu or English