--- id: vulture version: "2.16" license: The MIT License (MIT) Copyright (c) 2012-2020 Jendrik Seipp (jendrikseipp@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) license_treatment: permissive maintenance: active --- # vulture — Find dead code License: permissive · Maintenance: active · Downloads: 11.2M/mo ## What it is and what it does Vulture performs static analysis on Python source code to identify unused functions, classes, methods, variables, imports, and unreachable code blocks. It assigns confidence scores (60–100%) to each finding to indicate how certain it is that the code is genuinely dead, helping developers distinguish between high-confidence dead code and potential false positives that may result from Python's dynamic nature. The tool is designed for code cleanup and quality improvement in large codebases. It can be run as a command-line tool on individual files or entire directories, integrated into pre-commit hooks, or used programmatically via its Python API. Configuration is supported through pyproject.toml, and false positives can be managed through whitelists, exclusion patterns, decorator ignoring, and name-matching rules. Use it for: - Clean up large codebases by identifying and removing unused functions and classes that accumulate over time - Find untested code by running Vulture on both library and test suite to detect code paths not covered by tests - Detect unreachable code blocks and dead imports that may indicate logic errors or incomplete refactoring - Integrate into CI/CD pipelines via pre-commit hooks to prevent dead code from being committed to repositories - Suppress known false positives in dynamic code using whitelists and configuration rules ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Vulture is a static code analyzer that finds unused code in Python programs by scanning for dead functions, classes, variables, imports, and unreachable code blocks. Yes. Vulture is a mature, actively maintained tool with no known vulnerabilities, low install friction, and permissive MIT licensing. It fills a genuine need in code quality workflows—static analysis alone cannot catch all dead code due to Python's dynamic nature, but Vulture's confidence scoring and false-positive suppression mechanisms make it practical for real projects. ## Install pip install vulture uv add vulture poetry add vulture ## Installing vulture Before you install: Low friction install with a single lightweight dependency (tomli). The project is actively maintained with recent releases and supports Python 3.9 through 3.14. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects. Quickstart: pip install vulture vulture myscript.py vulture myscript.py --min-confidence 100 Verify before relying: - Accuracy of confidence scoring for different code types and whether 60–100% ranges hold across diverse codebases - Performance characteristics on very large codebases and whether static analysis speed scales linearly ## Package facts - License: The MIT License (MIT) Copyright (c) 2012-2020 Jendrik Seipp (jendrikseipp@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 11.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags find dead code python, unused code detection, static code analysis, remove unused functions, code cleanup tool, dead import finder, python code quality, code-quality, static-analysis, linting [View on SkillFed](https://skillfed.io/packages/vulture) · [View on PyPI](https://pypi.org/project/vulture/)