Tool Open source · MIT

Vulture

Vulture is a Python static-analysis tool that finds unused and unreachable code. It parses Python files with the ast module, records defined and used object names while traversing their abstract syntax trees, and reports definitions that are not used; it also detects code after return, break, continue, or raise statements and unsatisfiable conditional or loop conditions.

View repository

Overview

It analyzes Python files and directories, assigns reported items confidence values, supports minimum-confidence filtering, sorts findings by size, and can generate Python whitelist files to suppress false positives caused by dynamic usage. It can be installed with pip, configured through pyproject.toml, run as a pre-commit hook or GitHub Action, used through a VS Code extension, or called programmatically. The repository is maintained by Jendrik Seipp and is distributed as a Python project.