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 use the config in your project, use the following Makefile targets:

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

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