S-SCOTTEK← HomepageNewsGuidesBuyingTeamForumSupportlog in · sign up
linux 2026-11-07

Ruff 0.17.4: Find and Auto-Fix Python Errors in Seconds

This guide is the written companion to the video Ruff 0.17.4: Find and Auto-Fix Python Errors in Seconds (98s, uploaded 2026-11-07), and it treats the video as the starting point. Claims shown in the recording are labeled In the video, and everything confirmed against the official project docs is labeled Added from the sources. Anything not independently confirmed is marked untested. The auto-subtitles fetched cleanly with no errors, so the transcript used here is the video's own captions, and there is no Prag research folder for this video. The description notes the voiceover is synthetic narration and the terminal frames recreate verbatim outputs from a real test run, which matches the on-screen simulated-terminal labels.

In the video: Ruff 0.17.4, released two days before the video, is the fastest Python linter and formatter in one tiny binary — one install gives you check, fix, and format from a single tool. Added from the sources: the 0.17.4 release page shows the release dated 2026-11-05, which matches the video's two-days-ago note, and the Ruff docs describe the same one-binary model where ruff check lints and ruff format formats.

Check the machine first

Prerequisites check: lsb_release prints Ubuntu 24.04.5 LTS with x86_64, and curl 8.5.0 is present — Ruff itself needs no Python, shipping as one static binary
Prerequisites check: lsb_release prints Ubuntu 24.04.5 LTS with x86_64, and curl 8.5.0 is present — Ruff itself needs no Python, shipping as one static binary (Still from the walkthrough video.)

In the video: you need 64-bit Ubuntu 24.04 with curl. Ruff itself needs no Python to run — it ships as one static binary — so there is no interpreter setup before installing. Two commands prove readiness, and the still shows exactly these answers: lsb_release -d && uname -m prints Ubuntu 24.04.5 LTS with x86_64, and curl --version prints curl 8.5.0. The demo uses one small Python file as the lint target, which is a video claim repeated as given and is untested here.

Install from the official script

Install verified: sourcing the installer-created env file puts the user-local binary on PATH, and ruff minus minus version answers 0.17.4
Install verified: sourcing the installer-created env file puts the user-local binary on PATH, and ruff minus minus version answers 0.17.4 (Still from the walkthrough video.)

In the video: the official installer lives at the astral.sh install page shown on screen — one command fetches it over a secure connection and drops the binary into your local bin folder, for your user only, with no sudo needed. Then load the new PATH entry the installer created and check the version: ruff 0.17.4. Added from the sources: the installation docs give the standalone installer as curl -LsSf https://astral.sh/ruff/install.sh | sh, with version-pinned forms like https://astral.sh/ruff/0.5.0/install.sh, so the video's pinned-install approach matches documented behavior. The docs also list uvx, pip, pipx, Homebrew, and Conda routes as alternatives.

Configure four rule families

In the video: the demo project file switches on four rule families — style errors, unused code, import order, and modern syntax — with line length 100. Ruff reads the config on every run. The description gives the demo config as [tool.ruff] line-length = 100 with [tool.ruff.lint] select E, F, I, UP in pyproject.toml. Added from the sources: the 0.17.4 release notes touch all four of these areas — formatter and pyflakes/isort-adjacent rule work — which is consistent with the video's config, though the exact demo file contents are a video claim and are untested here.

Find four errors, fix to zero

First run: ruff check finds four errors — unsorted imports, two unused imports, and one unused variable — exiting nonzero so a commit hook would fail
First run: ruff check finds four errors — unsorted imports, two unused imports, and one unused variable — exiting nonzero so a commit hook would fail (Still from the walkthrough video.)

In the video: the first ruff check run reports four findings — unsorted imports (I001), two unused imports (F401 for os and sys), and one unused variable (F841) — and exits nonzero, so it fails a commit hook today. That is the point. ruff check --fix then clears all three fixable findings, ruff format normalizes spacing, and the recheck passes: four errors to zero, one file reformatted. The still shows the first-run output with the Found 4 errors summary. All outputs here are video claims repeated as given and are untested, since no local install was run for this guide.

Sources and next steps

Watch the walkthrough

Watch on YouTube