{"categories":[{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance"}],"enrichment":{"capability":"autoflake removes unused imports and unused variables from Python code by analyzing it with pyflakes, and optionally removes useless pass statements.","skillfed_tags":["code-cleanup","pre-commit-ready","linting"],"use_cases":["Run as a pre-commit hook to automatically clean up unused imports before code review.","Integrate into CI/CD pipelines to check for unused code and fail builds when cleanup is needed.","Refactor legacy Python codebases to remove accumulated dead imports and variables.","Configure with --imports to safely remove unused third-party imports in specific projects.","Use --expand-star-imports to replace wildcard imports with explicit names for clarity."],"what_it_does":"autoflake is a command-line tool that automatically detects and removes unused imports and variables from Python source files. It uses pyflakes to identify dead code and by default only removes unused imports from the standard library, leaving third-party imports untouched unless explicitly configured. This conservative default prevents accidental removal of imports that may have side effects.\n\nThe tool is typically used as a standalone formatter or integrated into pre-commit hooks to enforce code cleanliness. It supports configuration via pyproject.toml or setup.cfg, can operate on single files or recursively through directories, and offers fine-grained control over what gets removed\u2014from all unused imports to unused variables to duplicate dictionary keys. It also removes useless pass statements by default.","worth_installing":"Yes. autoflake is a lightweight, actively maintained tool with no security vulnerabilities, minimal dependencies, and a permissive MIT license. It solves a real code-quality problem with low friction and is well-suited for both individual developers and teams integrating it into CI/CD workflows."},"id":"autoflake","links":{"html":"https://skillfed.io/packages/autoflake","md":"https://skillfed.io/packages/autoflake.md","pypi":"https://pypi.org/project/autoflake/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-02-20","license_spdx":"MIT","license_treatment":"permissive","name":"autoflake","python_support":"supports_current","summary":"Removes unused imports and unused variables"},"popularity":{"monthly_downloads":6494194,"position":1900,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.3.3"}
