Show HN: Unref – A Python dead code finder built on Ruff's parser
discuss
- Points61
- Comments18
discuss
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…
Story details from Hacker News ↗ · linked article on github.com.
Show HN: Unref – A Python dead code finder built on Ruff's parser was first seen on Hacker News · Front page on Nov 18, 2026. Since then it has appeared in 67 checks on 3 different days, across 2 lists (Hacker News · Front page, Hacker News · Show HN · this week). Its best position was #20 of 30, reached on Nov 18, 06:43 UTC. It dropped off the list after Nov 20, 02:51 UTC.
Position on Hacker News · Front page at every check (lower is better).
Best rank per day (UTC).
Platform metric as reported by Hacker News.
| List | Best | Days | Checks | Last seen |
|---|---|---|---|---|
| Hacker News · Front page | #20 | 1 | 28 | |
| Hacker News · Show HN · this week | #19 | 3 | 39 |
A few top-level comments from Hacker News, shortened. Read the full thread on Hacker News.
Cool project. I think false positives are more important than the dead code it misses at this stage. For example, it marks all Django settings as unused variables, probably because settings are typically not imported directly in Django projects. For example: from django.conf import settings ... if settings.DEBUG: ...…
I've been trying to do something like this internally too. Also started with Python, then moved onto ruff. My goal is a bit broader though. I want to use the dependency graph to detect changed parts of the project to selectively trigger image builds and run tests. Results are still poor, specially on the tests side.…
What is the definition of dead code that Unref uses? I distinguish between apps and libraries. In apps I can see how any code not callable from the entrypoint is dead, and for libraries I guess a definition is any code that is not callable from a public api? Would be nice to see the definition used placed in the…
Archived daily, weekly and monthly lists that include this entry.
Not at the moment. It was last on the list on Nov 20, 02:51 UTC, after 3 days of trending.
#20 on Hacker News · Front page, on Nov 18, 06:43 UTC. Trendoday checks this list every 15 minutes.
It was first seen on Nov 18, 2026 and has been on the list on 3 days (67 checks) since.
61 points and 18 comments; submitted by McAvey on Nov 16, 2026.