# dosisod/refurb

A tool for refurbishing and modernizing Python codebases

Repository: https://github.com/dosisod/refurb
Canonical: https://ross.abutalabs.com/products/refurb
Language: Python
License: GPL-3.0
License Family: copyleft
Topics: cli, mypy, python, python310, testing, gplv3, python311, python312
Last push: 2026-04-03T21:43:32+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 75, release rhythm 53, longevity 100
- inputs: {"age_days": 1498, "days_push": 152, "days_rel": 152, "gap_med": 125, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2532, forks 59 (observed 2026-08-28T04:06:58.940479+00:00)

## What it is
Refurb is a command-line linter that suggests modern, idiomatic replacements for older or verbose Python code patterns. It uses type information to detect refactorings like replacing file-reading boilerplate with pathlib or redundant casts, and explains each check via error codes.

## Use cases
- modernize legacy python codebase
- find verbose file reading patterns to replace with pathlib
- lint python code for redundant casts
- suggest idiomatic python replacements
- explain lint suggestions with examples
- enforce modern python idioms in ci

## When to choose
- you want suggestions for modernizing old Python idioms beyond what flake8/ruff offer
- you want explanations for each lint rule with good/bad examples
- your codebase targets Python 3.7+ but you can run tools on 3.10+

## When to avoid
- you need auto-fixing of lint errors rather than suggestions
- you need a linter for Python versions below 3.7
- you want a general-purpose linter covering style, imports, and complexity - use ruff or flake8 instead

## Facets
- artifact type: cli-tool
- maturity: active
- function: linter, cli, developer-tools
- domain: developer-tools
- platform: cli, python, cross-platform
- tags: code-modernization, static-analysis, mypy, python-linter, code-quality, command-line, python

## Member repositories
- dosisod/refurb (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:58.940479+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:25:17.836626+00:00, confidence not recorded.
  - readme: https://github.com/dosisod/refurb (fetched 2026-08-28T04:06:58.940479+00:00, sha f0978ca63408)
  - registry_pypi: https://pypi.org/pypi/refurb/json (fetched 2026-08-29T10:07:27.204273+00:00, sha 9e9458af8438)
- Data as of 2026-08-30T08:39:29.467469+00:00.
