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.
def fnc(a, b={}):
pass
foo.py:2:14: M511 - mutable default arg of type Dict
pip install flake8-mutable
- Callables
- added MANIFEST.in