PylintΒΆ
Weβre using Pylint to do most of the linting of Python files.
Pylint configΒΆ
Please have a look at the latest Pylint config for all the configured options.
Hint
To see all available configuration options, have a look at the Pylint documentation.
bad-whitespaceΒΆ
Because of Variable assignment alignment, weβve to disable this check.
Hint
Unfortunately, Pylint only allows us to disable the complete whitespaces check and not only the variable assignment checks. However, we use pycodestyle to check the other assignments.
wrong-import-orderΒΆ
Weβre using isort for import checks and Pylint will fail, as weβve separate sections in isort.
duplicate-codeΒΆ
Weβre deactivating the check for duplicate code, because this triggers too many times. This is quite common in Django projects.
Pylint MakefileΒΆ
To run pylint
in your project, use the following Makefile
target:
LINTER_CONFIGS = https://gitlab.confirm.ch/confirm/guidelines/raw/master/configs
test-pylint:
curl -sSfLo .pylintrc $(LINTER_CONFIGS)/pylintrc
pylint $(SOURCE_DIR)