Implement pre-commit hooks

This commit is contained in:
hematogender 2020-05-12 14:01:58 +03:00
commit d8ea95b05d
3 changed files with 24 additions and 0 deletions

10
.flake8 Normal file
View file

@ -0,0 +1,10 @@
[flake8]
max-line-length = 99
select = C,E,F,W,B,B950
ignore = E203, E266, E731, E501, W503, F401, F403, F405
exclude =
.git
.github
__pycache__
docs

9
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,9 @@
repos:
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
hooks:
- id: yapf
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.0
hooks:
- id: flake8

5
.style.yapf Normal file
View file

@ -0,0 +1,5 @@
[style]
based_on_style = pep8
column_limit = 99
split_before_arithmetic_operator=true