Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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+

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)

  • Prevent lambda params in a parenth form enforcing a trailing comma. (Issue #41)
  • Fix issue preventing execution on Python 2 with Flake8 3. (Issue #35)
  • Allow bare wrapped subscript notation access. (Issue #39)
  • Don’t require comma in assert statement with parenth form. (Issue #37)

0.4.1 (2017-01-18)

  • Add the framework flake8 trove classifier.

0.4.0 (2017-01-18)

  • Support flake8 3.x.x. (Issue #20)
  • No trailing comma after any function def with unpack.
  • support Python 3.6 issue9232 trailing commas. (Issue #33)

0.3.1 (2017-01-18)

  • Also parse unpacks with literals. (Issue #30)

0.3.0 (2017-01-16)

  • If there is a comment after the last item, do not report an error. (Issue #18)
  • If there is an empty, tuple, list, dict, or function, do not report an error. (Issue #17)
  • Support PEP 3132 Python 3.5+ extended unpacking. (Issue #26)
  • *args should not require a trailing comma. (Issue #27)

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
Release History

Release History

This version
History Node

0.4.3

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0

History Node

0.3.1

History Node

0.3.0

History Node

0.2.0

History Node

0.1.6

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
flake8_commas-0.4.3-py2.py3-none-any.whl (7.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Apr 25, 2017
flake8-commas-0.4.3.tar.gz (7.5 kB) Copy SHA256 Checksum SHA256 Source Apr 25, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting