mutable defaults flake8 extension
Project description
flake8-mutable
--------------
#### 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](http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments).
#### Example
```
def fnc(a, b={}):
pass
foo.py:2:1: M511 - mutable default arg of type Dict
```
#### Installation
```
pip install flake8-mutable
```
#### License
[MIT](https://opensource.org/licenses/MIT)
--------------
#### 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](http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments).
#### Example
```
def fnc(a, b={}):
pass
foo.py:2:1: M511 - mutable default arg of type Dict
```
#### Installation
```
pip install flake8-mutable
```
#### License
[MIT](https://opensource.org/licenses/MIT)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flake8-mutable-1.1.0.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8-mutable-1.1.0.tar.gz.
File metadata
- Download URL: flake8-mutable-1.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc3824c5ef0b9bffdaa18ab64cd08ef8dcae30969033a6d71dfbac878a058c4f
|
|
| MD5 |
8f35a558d80d6899347cb6f188559956
|
|
| BLAKE2b-256 |
866080c6260326bf4273a41f76100734d94427f6aba82c28e879771a6962205d
|
File details
Details for the file flake8_mutable-1.1.0-py2-none-any.whl.
File metadata
- Download URL: flake8_mutable-1.1.0-py2-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efe040cd13fde5b8a940deda4c278cdb183cfe34cd32505a90aa506cd9715eed
|
|
| MD5 |
59ba4ccc52b57a73dd1d2ebefd340e62
|
|
| BLAKE2b-256 |
ab9eab8c60a99b14d3c30b013144993fcf69c97adfae99fb92fa7f8caace683a
|