Flake8 lint for trailing commas.
Project description
Usage
If you are using flake8 it’s as easy as:
pip install flake8-commas
Now you can avoid those annoying merge conflicts on dictionary and list diffs.
Errors
Different versions of python require commas in different places. Ignore the errors for languages you don’t use in your flake8 config:
Code |
message |
---|---|
C812 |
missing trailing comma |
C813 |
missing trailing comma in Python 3 |
C814 |
missing trailing comma in Python 2 |
C815 |
missing trailing comma in Python 3.5+ |
C816 |
missing trailing comma in Python 3.6+ |
C819 |
trailing comma prohibited |
0.5.1.a1 (2018-01-02)
Refactor single/multi tuple/subscript to simply count commas in all cases, prohibit trailing commas in lambda parameter lists, fix a missing trailing comma false positive in subcripts with slices and fix a prohibited trailing comma false positve in subscripts with slices. (Issue #48)
0.5.0 (2018-01-02)
0.4.3 (2017-04-25)
Enforce trailing commas in subscript tuples and slices again. Regression from 0.4.2 (Issue #42)
0.4.2 (2017-04-18)
0.4.1 (2017-01-18)
Add the framework flake8 trove classifier.
0.4.0 (2017-01-18)
0.3.1 (2017-01-18)
Also parse unpacks with literals. (Issue #30)
0.3.0 (2017-01-16)
0.2.0 (2017-01-13)
First version of flake8-commas with changelog
Fix HTML readme render on PyPI.
Support various parenth_form edge cases.
Merge from flake8-trailing-commas
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for flake8_commas-0.5.1a1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99a093f6feeec9c80a39f891745e044044e209939ecc3a5fee36adddd18688a0 |
|
MD5 | b0d31ea8010fe2fe15e4071392be270c |
|
BLAKE2b-256 | 7a2b58645c9f04a79bb86d58d306dbc9061983cb0b40f87f13ed0942cdc7d0f4 |