Fly Labs
Buy me some API creditsAsk FlyBot

Unref – A Python dead code finder built on Ruff's parser

I wanted a good Python dead code finder that just works, with minimal config, until Ruff adds support for that (https://github.com/astral-sh/ruff/issues/872).None of the newer alternatives to Vulture worked out of the box on my codebases, so I decided to build one.The first version was in Python, then I switched to Rust for speed and to reuse Ruff's parser. It checks all of CPython in under a second.It found lots of interesting dead code in my team's codebases, and it's the first time in years we've had a Python dead code finder in our CI.Feedback is very welcome, especially dead code it misses.

Hacker NewsToolDevSource
0Sign in to voteCopy link

FL score

48

out of 100

Verdict

SKIP

medium confidence

Competition

No competitor data yet

Trend

No signal yet

A fast Rust dead code finder for Python that works with minimal config and reuses Ruff's parser.

The pain

Python codebases collect unused functions, classes and variables over time, and existing tools like Vulture produce false positives or need heavy setup, so most teams do not run one in CI.

The gap

Newer Vulture alternatives did not work out of the box for the author, and Ruff has an open issue for dead code detection but has not shipped it. A fast, low-config tool fills that gap until Ruff does.

Build angle

Keep it a free open source CLI for adoption. If a business is wanted, offer a paid layer such as a hosted CI report, PR comments with dead code diffs, or team dashboards across repos. Improve recall on dynamic patterns like decorators, framework entry points and string-based imports.

Strengths

  • Very fast, scanning all of CPython in under a second
  • Minimal config, which is the main complaint about existing tools
  • Already used in a real team's CI with real findings
  • Reusing Ruff's parser keeps the build small for one person

Risks

  • Ruff may add the feature natively and make this redundant
  • Python is dynamic, so false positives and missed dead code will limit trust
  • Developers rarely pay for linters, so monetization is weak
  • Depends on Ruff's parser internals, which can change without notice

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “Unref – A Python dead code finder built on Ruff's parser”.

Open FlyBot