{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/17"}],"enrichment":{"capability":"A flake8 plugin that detects mutable default arguments in Python function definitions, flagging a common source of unexpected behavior where mutations persist across function calls.","skillfed_tags":["linting","code-quality","flake8-plugin"],"use_cases":["Add to your flake8 configuration in CI/CD to catch mutable defaults before code review.","Use during local development to flag function definitions with mutable defaults as you write.","Audit an existing codebase for instances of this anti-pattern across many files at once.","Enforce a team coding standard that prohibits mutable defaults in function signatures."],"what_it_does":"flake8-mutable is a linter plugin for flake8 that catches a subtle but common Python gotcha: mutable default arguments. When you define a function with a mutable default like `def func(arg=[])`, that same list object is reused across all calls, so mutations in one call affect subsequent calls. This plugin scans your code and flags these patterns with error codes like M511 for dict defaults.\n\nIt integrates directly into flake8's checking pipeline, so once installed, it runs automatically when you invoke flake8 on your codebase. The plugin has no runtime dependencies beyond flake8 itself, making it a lightweight addition to your linting setup. It's designed for developers who want to catch this class of bug early during code review or CI/CD checks.","worth_installing":"Yes, if you use flake8 and want to catch mutable default arguments automatically. The plugin is lightweight, has no dependencies, and addresses a real Python pitfall. The long gap since the last release (2017) is a minor concern, but the repository remains active and the plugin's scope is narrow enough that it is unlikely to break with new Python versions."},"id":"flake8-mutable","links":{"html":"https://skillfed.io/packages/flake8-mutable","md":"https://skillfed.io/packages/flake8-mutable.md","pypi":"https://pypi.org/project/flake8-mutable/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2017-04-24","license_spdx":null,"license_treatment":"permissive","name":"flake8-mutable","python_support":"unspecified","summary":"mutable defaults flake8 extension"},"popularity":{"monthly_downloads":166166,"position":10506,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.2.0"}
