pycodestyle#

We’re using pycodestyle to do some linting of Python files.

pycodestyle config#

Please have a look at the latest pycodestyle config for all the configured options.

Hint

To see all available configuration options, have a look at the pycodestyle documentation.

E221#

We align variable assignment on multiple lines, therefore we’ve to deactivate this check. The rest of the whitespace checks remain active.

E501#

Since we’re checking the line length in Pylint, we no longer need to check it here, as we don’t want to specify any exceptions twice.

W503#

We follow the new PEP 8 standard and want to break before and not after binary operators.

Hint

This was introduced with this change. Therefor we’ve to manually disable W503 in favour of W504, as descrbied in this issue.

pycodestyle Makefile#

To run pycodestyle in your project, use the following Makefile target:

LINTER_CONFIGS = https://git.confirm.ch/confirm/guidelines/raw/master/configs

test-pycodestyle:
    curl -sSfLo tox.ini $(LINTER_CONFIGS)/tox.ini
    pycodestyle $(SOURCE_DIR)