MCPcopy Index your code
hub / github.com/ebeweber/flake8-mutable

github.com/ebeweber/flake8-mutable @v1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.0 ↗ · + Follow
5 symbols 19 edges 4 files 1 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

flake8-mutable

PyPI version

Motivation

Python's default arguments are evaluated at definition as opposed to when the function is invoked. This leads to unexpected behavior, as mutations persist between calls. For a more detailed explanation, see The Hitchhiker's Guide to Python.

Example

def fnc(a, b={}):
    pass

foo.py:2:14: M511 - mutable default arg of type Dict

Installation

pip install flake8-mutable

Changes

[1.1.0] 2016-11-26
  • Callables
[1.0.6] 2016-11-26
  • added MANIFEST.in

License

MIT

Core symbols most depended-on inside this repo

Shape

Function 2
Method 2
Class 1

Languages

Python100%

Modules by API surface

mutable_defaults.py3 symbols
tests/mutable_defaults_test.py2 symbols

For agents

$ claude mcp add flake8-mutable \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page