Add pre-commit flake8/isort checks (#6058)

After setting up the pre-commit hooks you will get `flake8` and `isort` checks.

Co-authored-by: Armen Zambrano <armenzg@users.noreply.github.com>
This commit is contained in:
Shubhank Saxena 2020-02-28 20:09:18 +05:30 коммит произвёл GitHub
Родитель 395237e732
Коммит 205871c75a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 17 добавлений и 0 удалений

9
.pre-commit-config.yaml Normal file
Просмотреть файл

@ -0,0 +1,9 @@
repos:
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort

Просмотреть файл

@ -12,6 +12,14 @@ If you only want to hack on the frontend, see the UI Development section below.
Before pushing new code, please make sure you are following our [Code Style](code_style.md#ui) and [Accessibility Guidelines](accessibility.md).
- If you would like pre-commit linting checks you can set it up like this:
```console
% pip install pre-commit
% pre-commit install
pre-commit installed at .git/hooks/pre-commit
````
From here on, linting checks will be executed every time you commit.
## UI Development
To get started: