Socket
Socket
Sign inDemoInstall

flake8-mutable

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    flake8-mutable

mutable defaults flake8 extension


Maintainers
1

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

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc